actix-web/awc
Rob Ede 276f5d5bd4
chore(actix-http): prepare release 3.11.0
2025-05-10 06:18:25 +01:00
..
examples docs: add tls to awc example 2024-12-29 15:17:18 +00:00
src chore: address clippy lints 2025-05-09 20:21:02 +01:00
tests build(deps): update rand requirement from 0.8 to 0.9 (#3564) 2025-02-09 02:39:22 +00:00
CHANGES.md build(deps): bump brotli from 7.0.0 to 8.0.0 (#3627) 2025-05-09 20:05:56 +00:00
Cargo.toml chore(actix-http): prepare release 3.11.0 2025-05-10 06:18:25 +01:00
LICENSE-APACHE add license files 2019-06-01 17:25:29 +06:00
LICENSE-MIT add license files 2019-06-01 17:25:29 +06:00
README.md chore(awc): prepare release 3.6.0 2025-03-09 19:03:27 +00:00

README.md

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
    });
}