mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-24 00:21:08 +01:00
6f0a6bd1bb
For intrepid commit message readers: The choice to add allows for the inlined format args lint instead of actually inlining them is not very clear because our actual real world MSRV is not clear. We currently claim 1.60 is our MSRV but this is mainly due to dependencies. I'm fairly sure that we could support < 1.58 if those deps are outdated in a users lockfile. We'll remove these allows again at some point soon. |
||
---|---|---|
.. | ||
examples | ||
src | ||
tests | ||
Cargo.toml | ||
CHANGES.md | ||
LICENSE-APACHE | ||
LICENSE-MIT | ||
README.md |
awc (Actix Web Client)
Async HTTP and WebSocket client library.
Documentation & Resources
- API Documentation
- Example Project
- Minimum Supported Rust Version (MSRV): 1.54
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
});
}