Module actix_web::client[][src]

Expand description

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 helpers for actix http client to use during testing.

Structs

An asynchronous HTTP and WebSocket client.

An HTTP Client builder

An HTTP Client request builder

Client Response

Manages http client network connectivity The Connector type uses a builder-like combinator pattern for service construction that finishes by calling the .finish() method.

A generic “error” for HTTP connections

Enums

A set of errors that can occur while connecting to an HTTP host

A set of errors that can occur during freezing a request

A set of errors that can occur during parsing json payloads

A set of errors that can occur during payload parsing

A set of errors that can occur during request sending and response reading

Websocket client error

Websocket handshake errors

Websocket protocol errors