Logo

Trashbin

Thats a ULTRA simple pastebin engine written in Rust!

API-Reference

API is VERY simple does not require any api keys, authorization, etc

Adding pastes:

Uploadable pastes stores directly in memory and has limit 5 MB and removes after 1 hour

Add paste with text/html content-type ``` POST /add BODY:

Response variants: pasteid, or any error type ```

Add paste with text/plain content-type ``` POST /addplain BODY:

Response variants: pasteid, or any error type ```

Viewing pastes:

``` GET /[pasteid]

Response: Paste content with text/html content type or 404 Error if paste not found ```

Errors:

Any error return 400 HTTP Code and reason in body with text/plain content-type:

request exceed 5 MB limit - Occurs if request has execeed 5 MB limit

empty request - Occurs if request body is empty

Building and running

Download and install rust, clone this repository and run cargo build --release

Go to target/relese folder and run:

./trashbin (ipadress:port)

Why?

I want to create ULTRA simple pastebin for IRC-bots multiline output - in this use case long-term storage is not needed...