ratmom 0.1.0

Sensible, async, curl-based HTTP client
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Capturing log events using a [tracing] subscriber.
//!
//! [tracing]: https://github.com/tokio-rs/tracing

fn main() -> Result<(), ratmom::Error> {
    tracing_subscriber::fmt::init();

    let mut response = ratmom::get("https://example.org")?;

    // Consume the response stream quietly.
    std::io::copy(response.body_mut(), &mut std::io::sink())?;

    Ok(())
}