l0wl3vel / bunny-storage-go-sdk Goto Github PK
View Code? Open in Web Editor NEWUnofficial Bunny.net Edge Storage API for Golang
License: MIT License
Unofficial Bunny.net Edge Storage API for Golang
License: MIT License
Hyrums law strikes again.
While looking for a way to coerce the list file endpoint to basically head a single file I found an undocumented endpoint to "head" a single file. It is called using the "DESCRIBE" instruction @bene1618 and I stumbled upon while I explained the insanity of using a trailing / to distinguish a List and Download API call using the bunny storage API. We found it by messing around with calling the HEAD method on a file and saw DESCRIBE in the Access Control Header:
HTTP/2 401
server: nginx
date: Mon, 22 Jan 2024 17:56:09 GMT
content-type: application/json
access-control-allow-headers: AccessKey, Content-Type
access-control-allow-methods: GET, DELETE, POST, PUT, DESCRIBE
access-control-allow-origin: *
Turns out that this allows you to get the Object Metadata for single non-directory files.
curl --request DESCRIBE --url https://storage.bunnycdn.com/myzone/meta/file.txt --header 'AccessKey: secret' --header 'accept: application/json'
This is a very useful function to implement efficient heading of objects in JuiceFS, which is why I think this should be implemented in the library.
It is also used in the official Java SDK: https://github.com/search?q=repo%3ABunnyWay%2FBunnyCDN.PHP.Storage%20describe&type=code
When running Github Actions tests on PRs the main branch gets built.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.