62 releases (14 stable)

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

#24 in HTTP client

Download history 23366/week @ 2024-02-04 23182/week @ 2024-02-11 25250/week @ 2024-02-18 25150/week @ 2024-02-25 25541/week @ 2024-03-03 25281/week @ 2024-03-10 28478/week @ 2024-03-17 24238/week @ 2024-03-24 27046/week @ 2024-03-31 24639/week @ 2024-04-07 25602/week @ 2024-04-14 25651/week @ 2024-04-21 24262/week @ 2024-04-28 25222/week @ 2024-05-05 26534/week @ 2024-05-12 22996/week @ 2024-05-19

100,541 downloads per month
Used in 375 crates (86 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
~536K SLoC