Expand description
Http client api
use actix_web::client;
fn main() {
actix::run(
|| client::get("http://www.rust-lang.org") // <- Create request builder
.header("User-Agent", "Actix-web")
.finish().unwrap()
.send() // <- Send http request
.map_err(|_| ())
.and_then(|response| { // <- server http response
println!("Response: {:?}", response);
Ok(())
})
);
}
Structs
ClientConnector
type is responsible for transport layer of a
client connection.Client connector usage stats
An HTTP Client Request
An HTTP Client request builder
An HTTP Client response
Connect
type represents a message that can be sent to
ClientConnector
with a connection request.HTTP client connection
Pause connection process for
ClientConnector
Resume connection process for
ClientConnector
SendRequest
is a Future
which represents an asynchronous
request sending process.Enums
A set of errors that can occur while connecting to an HTTP host
A set of errors that can occur during request sending and response reading