isahc 1.8.1

The practical HTTP client that is fun to use.
Documentation
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<(), isahc::Error> {
    env_logger::init();

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

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

    Ok(())
}