[−][src]Crate awc
An HTTP Client
use futures::future::{lazy, Future}; use actix_rt::System; use awc::Client; #[actix_rt::main] async fn main() { let mut client = Client::default(); let response = client.get("http://www.rust-lang.org") // <- Create request builder .header("User-Agent", "Actix-web") .send() // <- Send http request .await; println!("Response: {:?}", response); }
Modules
cookie | https://github.com/alexcrichton/cookie-rs fork |
error | Http client errors |
http | Various HTTP related types |
test | Test helpers for actix http client to use during testing. |
ws | Websockets client |
Structs
BoxedSocket | |
Client | An HTTP Client |
ClientBuilder | An HTTP Client builder |
ClientRequest | An HTTP Client request builder |
ClientResponse | Client Response |
Connector | Manages http client network connectivity
The |
FrozenClientRequest |
|
FrozenSendBuilder | Builder that allows to modify extra headers. |
JsonBody | Response's payload json parser, it resolves to a deserialized |
MessageBody | Future that resolves to a complete http message body. |
Enums
SendClientRequest | Future that sends request's payload and resolves to a server response. |