#actix #http #framework #async #web

awc

Async HTTP and WebSocket client library built on the Actix ecosystem

41 releases (6 stable)

3.0.0-beta.8 Sep 9, 2021
3.0.0-beta.7 Jun 26, 2021
3.0.0-beta.5 Apr 17, 2021
3.0.0-beta.3 Mar 8, 2021
0.1.0-alpha.2 Mar 30, 2019

#3 in WebSocket

Download history 31582/week @ 2021-06-02 33419/week @ 2021-06-09 33314/week @ 2021-06-16 32684/week @ 2021-06-23 31077/week @ 2021-06-30 31691/week @ 2021-07-07 32512/week @ 2021-07-14 30582/week @ 2021-07-21 33064/week @ 2021-07-28 33556/week @ 2021-08-04 46581/week @ 2021-08-11 29199/week @ 2021-08-18 31436/week @ 2021-08-25 28780/week @ 2021-09-01 33066/week @ 2021-09-08 31184/week @ 2021-09-15

138,624 downloads per month
Used in 350 crates (40 directly)

MIT/Apache

705KB
18K 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

Documentation & Resources

Example

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

~22MB
~522K SLoC