chttp 0.4.3

The practical HTTP client that is fun to use.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
fn main() -> Result<(), chttp::Error> {
    env_logger::init();

    let mut response = chttp::get("http://example.org")?;

    println!("Status: {}", response.status());
    println!("Headers:\n{:?}", response.headers());

    // Copy the response body directly to stdout.
    std::io::copy(response.body_mut(), &mut std::io::stdout())?;

    Ok(())
}