Struct hyper::client::Client [-] [+] [src]

pub struct Client<C> {
    // some fields omitted
}

A Client to use additional features with Requests.

Clients can handle things such as: redirect policy.

Methods

impl<'v> Client<HttpConnector<'v>>

fn new() -> Client<HttpConnector<'v>>

Create a new Client.

fn set_ssl_verifier(&mut self, verifier: ContextVerifier<'v>)

Set the SSL verifier callback for use with OpenSSL.

impl<C: NetworkConnector> Client<C>

fn with_connector(connector: C) -> Client<C>

Create a new client with a specific connector.

fn set_redirect_policy(&mut self, policy: RedirectPolicy)

Set the RedirectPolicy.

fn get<U: IntoUrl>(&mut self, url: U) -> RequestBuilder<U, C>

Execute a Get request.

fn head<U: IntoUrl>(&mut self, url: U) -> RequestBuilder<U, C>

Execute a Head request.

fn post<U: IntoUrl>(&mut self, url: U) -> RequestBuilder<U, C>

Execute a Post request.

fn put<U: IntoUrl>(&mut self, url: U) -> RequestBuilder<U, C>

Execute a Put request.

fn delete<U: IntoUrl>(&mut self, url: U) -> RequestBuilder<U, C>

Execute a Delete request.

fn request<U: IntoUrl>(&mut self, method: Method, url: U) -> RequestBuilder<U, C>

Build a new request using this Client.