rspaste

A simple, fast and fully-typed JSPaste API wrapper for Rust.
aidak.tk ยป


Installation

Put the desired version of the crate into the dependencies section of your Cargo.toml: toml [dependencies] rspaste = "*"

Examples

First of all, JSPaste API can return errors if a key or secret is invalid, so a good way of handling responses is: rs match some_doc { Ok(d) => todo!(), // ... Err(e) => todo!() // ... }

We recommend doing this with every request to ensure that all cases are covered.

```rs use rspaste;

fn main() { let doc = rspaste::api::get("key"); // get document let posteddoc = rspaste::api::post("content"); // post document let deleteddoc = rspaste::api::delete("key", "secret"); // delete document } ```