Struct hyper::client::Client
[−]
[src]
pub struct Client<C> { /* fields omitted */ }
A Client to make outgoing HTTP requests.
Methods
impl Client<DefaultConnector>
[src]
fn configure() -> Config<DefaultConnector>
Configure a Client.
Example
# use hyper::Client;
let client = Client::configure()
.keep_alive(true)
.max_sockets(10_000)
.build().unwrap();
impl Client<DefaultConnector>
[src]
fn new(handle: &Handle) -> Result<Client<DefaultConnector>>
Create a new Client with the default config.
impl<C: Connect> Client<C>
[src]
fn get(&mut self, url: Url) -> FutureResponse
Send a GET Request using this Client.
fn request(&mut self, req: Request) -> FutureResponse
Send a constructed Request using this Client.
Trait Implementations
impl<C: Clone> Clone for Client<C>
[src]
fn clone(&self) -> Client<C>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<C: Connect> Service for Client<C>
[src]
type Request = Request
Requests handled by the service.
type Response = Response
Responses given by the service.
type Error = Error
Errors produced by the service.
type Future = FutureResponse
The future response value.
fn call(&mut self, req: Request) -> Self::Future
Process the request and return the response asynchronously.