[][src]Module actix_web::client

An HTTP Client

use actix_web::client::Client;

#[actix_rt::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")
      .send().await;                      // <- Send http request

   println!("Response: {:?}", response);
}

Modules

test

Test helpers for actix http client to use during testing.

Structs

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 Connector type uses a builder-like combinator pattern for service construction that finishes by calling the .finish() method.

Enums

ConnectError

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

InvalidUrl
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