[][src]Crate awc

An HTTP Client

use actix_rt::System;
use awc::Client;

fn main() {
    System::new("test").block_on(lazy(|| {
       let mut client = Client::default();

       client.get("http://www.rust-lang.org") // <- Create request builder
          .header("User-Agent", "Actix-web")
          .send()                             // <- Send http request
          .map_err(|_| ())
          .and_then(|response| {              // <- server http response
               println!("Response: {:?}", response);
               Ok(())
          })
    }));
}

Modules

error

Http client errors

http

Various HTTP related types

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

WebsocketsRequest

WebSocket connection