62 releases (14 stable)

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

#33 in HTTP client

Download history 25623/week @ 2024-04-05 25277/week @ 2024-04-12 25715/week @ 2024-04-19 24575/week @ 2024-04-26 24557/week @ 2024-05-03 26828/week @ 2024-05-10 24375/week @ 2024-05-17 26339/week @ 2024-05-24 27509/week @ 2024-05-31 24730/week @ 2024-06-07 26086/week @ 2024-06-14 26685/week @ 2024-06-21 20379/week @ 2024-06-28 23599/week @ 2024-07-05 24658/week @ 2024-07-12 21623/week @ 2024-07-19

95,590 downloads per month
Used in 378 crates (88 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

~12–28MB
~514K SLoC