actix-web/awc
Rob Ede 1390e29705
docs: fix lint
2025-03-10 04:23:20 +00:00
..
examples docs: add tls to awc example 2024-12-29 15:17:18 +00:00
src docs: fix lint 2025-03-10 04:23:20 +00:00
tests build(deps): update rand requirement from 0.8 to 0.9 (#3564) 2025-02-09 02:39:22 +00:00
CHANGES.md chore(awc): prepare release 3.6.0 2025-03-09 19:03:27 +00:00
Cargo.toml refactor: use Payload::from internally 2025-03-10 04:23:03 +00: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
    });
}