Crate http_req

source ·
Expand description

Simple HTTP client with built-in HTTPS support. Currently it’s in heavy development and may frequently change.


Basic GET request

use http_req::request;

fn main() {
    let mut writer = Vec::new(); //container for body of a response
    let res = request::get("", &mut writer).unwrap();

    println!("Status: {} {}", res.status_code(), res.reason());


error system
creating and sending HTTP requests
parsing server response
uri operations