pub struct ClientBuilder { /* private fields */ }Expand description
Builder for configuring HTTP client
Implementations§
Source§impl ClientBuilder
impl ClientBuilder
Sourcepub fn default_header(
self,
name: impl AsRef<str>,
value: impl AsRef<str>,
) -> Result<Self>
pub fn default_header( self, name: impl AsRef<str>, value: impl AsRef<str>, ) -> Result<Self>
Add a default header for all requests
Sourcepub fn region(self, region: impl Into<String>) -> Self
pub fn region(self, region: impl Into<String>) -> Self
Set preferred region for regional routing
Sourcepub fn compression(self, enabled: bool) -> Self
pub fn compression(self, enabled: bool) -> Self
Enable automatic compression
Sourcepub fn max_redirects(self, max: usize) -> Self
pub fn max_redirects(self, max: usize) -> Self
Set maximum number of redirects to follow
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ClientBuilder
impl RefUnwindSafe for ClientBuilder
impl Send for ClientBuilder
impl Sync for ClientBuilder
impl Unpin for ClientBuilder
impl UnwindSafe for ClientBuilder
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