pub struct HttpClientBuilder { /* private fields */ }Expand description
HTTP client builder
Implementations§
Source§impl HttpClientBuilder
impl HttpClientBuilder
Sourcepub fn connect_timeout(self, connect_timeout: Duration) -> Self
pub fn connect_timeout(self, connect_timeout: Duration) -> Self
Set connection timeout
Sourcepub fn pool_max_idle_per_host(self, max_idle: usize) -> Self
pub fn pool_max_idle_per_host(self, max_idle: usize) -> Self
Set connection pool size
Sourcepub fn user_agent(self, user_agent: String) -> Self
pub fn user_agent(self, user_agent: String) -> Self
Set User-Agent
Sourcepub fn enable_gzip(self, enable: bool) -> Self
pub fn enable_gzip(self, enable: bool) -> Self
Enable/disable Gzip compression
Sourcepub fn enable_brotli(self, enable: bool) -> Self
pub fn enable_brotli(self, enable: bool) -> Self
Enable/disable Brotli compression
Trait Implementations§
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