Crates.io | ratmom |
lib.rs | ratmom |
version | 0.1.0 |
source | src |
created_at | 2023-01-20 15:12:37.671171 |
updated_at | 2023-01-20 15:12:37.671171 |
description | Sensible, async, curl-based HTTP client |
homepage | |
repository | https://codeberg.org/transcast/ratmom |
max_upload_size | |
id | 763414 |
size | 740,270 |
this is ratmom, a libcurl-based http client for rust that makes sense.
a fork of isahc.
please check out the documentation for details on what ratmom can do and how to use it. to get you started, here is a really simple, complete example that spits out the response body from https://example.org:
use ratmom::prelude::*;
fn main() -> Result<(), ratmom::Error> {
// Send a GET request and wait for the response headers.
// Must be `mut` so we can read the response body.
let mut response = ratmom::get("https://example.org")?;
// Print some basic info about the response to standard output.
println!("Status: {}", response.status());
println!("Headers: {:#?}", response.headers());
// Read the response body as text into a string and print it.
print!("{}", response.text()?);
Ok(())
}
click here for documentation on the latest version.
need some help with something ratmom-related? ask a question on our issues page, where we are happy to try and answer your questions!
install via cargo by adding to your Cargo.toml
file:
[dependencies]
ratmom = "0.1"
or simply:
cargo add ratmom
this project's source code and documentation are licensed under the MIT license. see the LICENSE file for details.