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

#94 in HTTP client

Download history 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 32252/week @ 2024-10-31 32106/week @ 2024-11-07 29045/week @ 2024-11-14 31349/week @ 2024-11-21 39596/week @ 2024-11-28 31214/week @ 2024-12-05

136,379 downloads per month
Used in 394 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

~12–28MB
~543K SLoC