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 [log] implementation.
//!
//! [log]: https://github.com/rust-lang/log

fn main() -> Result<(), ratmom::Error> {
    env_logger::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(())
}