[−][src]Struct hyper::client::Client
A Client to use additional features with Requests.
Clients can handle things such as: redirect policy, connection pooling.
Methods
impl Client[src]
impl Clientpub fn new() -> Client[src]
pub fn new() -> ClientCreate a new Client.
pub fn with_pool_config(config: Config) -> Client[src]
pub fn with_pool_config(config: Config) -> ClientCreate a new Client with a configured Pool Config.
pub fn with_http_proxy<H>(host: H, port: u16) -> Client where
H: Into<Cow<'static, str>>, [src]
pub fn with_http_proxy<H>(host: H, port: u16) -> Client where
H: Into<Cow<'static, str>>, Create a Client with an HTTP proxy to a (host, port).
pub fn with_proxy_config<C, S>(proxy_config: ProxyConfig<C, S>) -> Client where
C: NetworkConnector + Send + Sync + 'static,
C::Stream: NetworkStream + Send + Clone,
S: SslClient<C::Stream> + Send + Sync + 'static, [src]
pub fn with_proxy_config<C, S>(proxy_config: ProxyConfig<C, S>) -> Client where
C: NetworkConnector + Send + Sync + 'static,
C::Stream: NetworkStream + Send + Clone,
S: SslClient<C::Stream> + Send + Sync + 'static, Create a Client using a proxy with a custom connector and SSL client.
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) -> ClientCreate 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) -> RequestBuilderBuild a Get request.
pub fn head<U: IntoUrl>(&self, url: U) -> RequestBuilder[src]
pub fn head<U: IntoUrl>(&self, url: U) -> RequestBuilderBuild a Head request.
pub fn patch<U: IntoUrl>(&self, url: U) -> RequestBuilder[src]
pub fn patch<U: IntoUrl>(&self, url: U) -> RequestBuilderBuild a Patch request.
pub fn post<U: IntoUrl>(&self, url: U) -> RequestBuilder[src]
pub fn post<U: IntoUrl>(&self, url: U) -> RequestBuilderBuild a Post request.
pub fn put<U: IntoUrl>(&self, url: U) -> RequestBuilder[src]
pub fn put<U: IntoUrl>(&self, url: U) -> RequestBuilderBuild a Put request.
pub fn delete<U: IntoUrl>(&self, url: U) -> RequestBuilder[src]
pub fn delete<U: IntoUrl>(&self, url: U) -> RequestBuilderBuild 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) -> RequestBuilderBuild a new request using this Client.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> From for T[src]
impl<T> From for Timpl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeIdimpl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, fn borrow_mut(&mut self) -> &mut T[src]
fn borrow_mut(&mut self) -> &mut Timpl<T> Typeable for T where
T: Any, [src]
impl<T> Typeable for T where
T: Any,