Struct hyper::client::Client [−][src]
pub struct Client { /* fields omitted */ }
A Client to use additional features with Requests.
Clients can handle things such as: redirect policy, connection pooling.
Methods
impl Client
[src]
impl Client
pub fn new() -> Client
[src]
pub fn new() -> Client
Create a new Client.
pub fn with_pool_config(config: Config) -> Client
[src]
pub fn with_pool_config(config: Config) -> Client
Create a new Client with a configured Pool Config.
pub fn with_connector<C, S>(connector: C) -> Client where
C: NetworkConnector<Stream = S> + Send + Sync + 'static,
S: NetworkStream + Send,
[src]
pub fn with_connector<C, S>(connector: C) -> Client where
C: NetworkConnector<Stream = S> + Send + Sync + 'static,
S: NetworkStream + Send,
Create a new client with a specific connector.
pub fn with_protocol<P: Protocol + Send + Sync + 'static>(protocol: P) -> Client
[src]
pub fn with_protocol<P: Protocol + Send + Sync + 'static>(protocol: P) -> Client
Create a new client with a specific Protocol
.
pub fn set_redirect_policy(&mut self, policy: RedirectPolicy)
[src]
pub fn set_redirect_policy(&mut self, policy: RedirectPolicy)
Set the RedirectPolicy.
pub fn set_read_timeout(&mut self, dur: Option<Duration>)
[src]
pub fn set_read_timeout(&mut self, dur: Option<Duration>)
Set the read timeout value for all requests.
pub fn set_write_timeout(&mut self, dur: Option<Duration>)
[src]
pub fn set_write_timeout(&mut self, dur: Option<Duration>)
Set the write timeout value for all requests.
pub fn get<U: IntoUrl>(&self, url: U) -> RequestBuilder
[src]
pub fn get<U: IntoUrl>(&self, url: U) -> RequestBuilder
Build a Get request.
pub fn head<U: IntoUrl>(&self, url: U) -> RequestBuilder
[src]
pub fn head<U: IntoUrl>(&self, url: U) -> RequestBuilder
Build a Head request.
pub fn patch<U: IntoUrl>(&self, url: U) -> RequestBuilder
[src]
pub fn patch<U: IntoUrl>(&self, url: U) -> RequestBuilder
Build a Patch request.
pub fn post<U: IntoUrl>(&self, url: U) -> RequestBuilder
[src]
pub fn post<U: IntoUrl>(&self, url: U) -> RequestBuilder
Build a Post request.
pub fn put<U: IntoUrl>(&self, url: U) -> RequestBuilder
[src]
pub fn put<U: IntoUrl>(&self, url: U) -> RequestBuilder
Build a Put request.
pub fn delete<U: IntoUrl>(&self, url: U) -> RequestBuilder
[src]
pub fn delete<U: IntoUrl>(&self, url: U) -> RequestBuilder
Build a Delete request.
pub fn request<U: IntoUrl>(&self, method: Method, url: U) -> RequestBuilder
[src]
pub fn request<U: IntoUrl>(&self, method: Method, url: U) -> RequestBuilder
Build a new request using this Client.