63 releases (15 stable)

3.5.1 Aug 10, 2024
3.5.0 May 19, 2024
3.4.0 Feb 4, 2024
3.3.0 Dec 24, 2023
0.1.0-alpha.2 Mar 30, 2019

#70 in HTTP client

Download history 26927/week @ 2024-07-18 25700/week @ 2024-07-25 24539/week @ 2024-08-01 30287/week @ 2024-08-08 25096/week @ 2024-08-15 23150/week @ 2024-08-22 24311/week @ 2024-08-29 30608/week @ 2024-09-05 25789/week @ 2024-09-12 24411/week @ 2024-09-19 40633/week @ 2024-09-26 34417/week @ 2024-10-03 34364/week @ 2024-10-10 37568/week @ 2024-10-17 35597/week @ 2024-10-24 31882/week @ 2024-10-31

145,151 downloads per month
Used in 393 crates (91 directly)

MIT/Apache

1MB
20K SLoC

awc (Actix Web Client)

Async HTTP and WebSocket client library.

crates.io Documentation MIT or Apache 2.0 licensed Dependency Status Chat on Discord

Examples

Example project using TLS-enabled client →

Basic usage:

use actix_rt::System;
use awc::Client;

fn main() {
    System::new().block_on(async {
        let client = Client::default();

        let res = client
            .get("http://www.rust-lang.org")    // <- Create request builder
            .insert_header(("User-Agent", "Actix-web"))
            .send()                             // <- Send http request
            .await;

        println!("Response: {:?}", res);        // <- server http response
    });
}

Dependencies

~13–29MB
~551K SLoC