pub struct HttpClientBuilder { /* private fields */ }Expand description
HTTP client builder for configuring proxy and TLS settings
Implementations§
Source§impl HttpClientBuilder
impl HttpClientBuilder
Sourcepub fn danger_accept_invalid_certs(self, accept: bool) -> Self
pub fn danger_accept_invalid_certs(self, accept: bool) -> Self
Accept invalid TLS certificates
Sourcepub fn no_redirects(self) -> Self
pub fn no_redirects(self) -> Self
Disable automatic HTTP redirect following
Sourcepub fn proxy(self, url: Url) -> Self
pub fn proxy(self, url: Url) -> Self
Set an HTTP proxy URL.
The bitreq backend supports HTTP proxy URLs only. SOCKS proxy schemes
such as socks5h require building this crate with the reqwest feature.
Sourcepub fn proxy_with_matcher(self, url: Url, pattern: &str) -> Response<Self>
pub fn proxy_with_matcher(self, url: Url, pattern: &str) -> Response<Self>
Set an HTTP proxy URL with a host pattern matcher.
The bitreq backend supports HTTP proxy URLs only. SOCKS proxy schemes
such as socks5h require building this crate with the reqwest feature.
Sourcepub fn build(self) -> Response<HttpClient>
pub fn build(self) -> Response<HttpClient>
Build the HTTP client
Trait Implementations§
Source§impl Debug for HttpClientBuilder
impl Debug for HttpClientBuilder
Source§impl Default for HttpClientBuilder
impl Default for HttpClientBuilder
Source§fn default() -> HttpClientBuilder
fn default() -> HttpClientBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for HttpClientBuilder
impl RefUnwindSafe for HttpClientBuilder
impl Send for HttpClientBuilder
impl Sync for HttpClientBuilder
impl Unpin for HttpClientBuilder
impl UnsafeUnpin for HttpClientBuilder
impl UnwindSafe for HttpClientBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more