[−][src]Module actix_web::client
Actix web async HTTP client.
use actix_web::client::Client; #[actix_web::main] async fn main() { let mut client = Client::default(); // Create request builder and send request let response = client.get("http://www.rust-lang.org") .header("User-Agent", "actix-web/3.0") .send() // <- Send request .await; // <- Wait for response println!("Response: {:?}", response); }
Modules
| test | Test helpers for actix http client to use during testing. |
Structs
| Client | An asynchronous HTTP and WebSocket client. |
| ClientBuilder | An HTTP Client builder |
| ClientRequest | An HTTP Client request builder |
| ClientResponse | Client Response |
| Connector | Manages http client network connectivity
The |
| HttpError | A generic "error" for HTTP connections |
Enums
| ConnectError | A set of errors that can occur while connecting to an HTTP host |
| FreezeRequestError | A set of errors that can occur during freezing a request |
| InvalidUrl | |
| JsonPayloadError | A set of errors that can occur during parsing json payloads |
| PayloadError | A set of errors that can occur during payload parsing |
| SendRequestError | A set of errors that can occur during request sending and response reading |
| WsClientError | Websocket client error |
| WsHandshakeError | Websocket handshake errors |
| WsProtocolError | Websocket protocol errors |