Expand description
The simplest way to use http_cat is like so:
use http_cat::HttpCat;
#[tokio::main]
async fn main() {
HttpCat::ImATeapot.get().await.unwrap().save("418.jpeg").unwrap();
}This is the resulting image:
You can also optionally enable the http and/or
rocket features to convert those libraries’ own
status structures to HttpCat with ::try_from().
[dependencies]
http_cat = { version = "0.1.0", features = ["rocket"] }Enums§
- Error
- The error possibly returned by
HttpCat::get(). - HttpCat
- A HTTP status code that correlates to a silly image of a cat.