http_req 0.14.4

simple and lightweight HTTP client with built-in HTTPS support
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use http_req::request;

fn main() {
    // Sends a HTTP GET request and processes the response.
    let mut body = Vec::new();
    let res = request::get("https://jigsaw.w3.org/HTTP/ChunkedScript", &mut body).unwrap();

    // Prints details about the response.
    println!("Status: {} {}", res.status_code(), res.reason());
    println!("Headers: {}", res.headers());
    //println!("{}", String::from_utf8_lossy(&body));
}