Buckets
API Usage
Storing Buckets
To store a bucket send a POST request to http://localhost:8080 with the message or file as the request body. Storing a message with curl would look like this:
curl -X POST --data "Hello, World" http://localhost:8080
A file upload would look like this:
curl -X POST --data-binary @path/to/file http://localhost:8080
The response is the URL where your data is stored at. E.g. http://localhost:8080/shbo
You can also store a bucket at a location of your choice by sending a POST request to that location:
curl -X POST --data-binary @path/to/file http://localhost:8080/my/custom/bucket/location
Now your bucket is stored at http://localhost:8080/my/custom/bucket/location.WARNING: This will replace any data that was stored at this location before.
Retrieving Buckets
Simply send a GET request to the URL your bucket is stored at. E.g. through opening the address in your browser or using curl:
curl http://localhost:8080/shbo
If your bucket stores binary data you can save the data into a file using:
curl -o path/to/savefile http://localhost:8080/shbo
Deleting Buckets
To delete a bucket send a DELETE request to the URL your bucket is stored at. E.g. using curl:
curl -X DELETE http://localhost:8080/shbo