pub struct ClientBuilder { /* private fields */ }
Available on crate feature
client
only.Expand description
Builder for the HTTP client.
Implementations§
Source§impl ClientBuilder
impl ClientBuilder
Sourcepub const fn connection_timeout(self, timeout: Option<Duration>) -> Self
pub const fn connection_timeout(self, timeout: Option<Duration>) -> Self
Set connection timeout (default is 60 seconds).
Sourcepub const fn read_timeout(self, timeout: Option<Duration>) -> Self
pub const fn read_timeout(self, timeout: Option<Duration>) -> Self
Set read timeout (default is 60 seconds).
Sourcepub const fn write_timeout(self, timeout: Option<Duration>) -> Self
pub const fn write_timeout(self, timeout: Option<Duration>) -> Self
Set write timeout (default is 60 seconds).
Sourcepub const fn request_timeout(self, timeout: Option<Duration>) -> Self
pub const fn request_timeout(self, timeout: Option<Duration>) -> Self
Set request timeout (default is 60 seconds).
Note: The request timeout does not include reading the body.
Sourcepub const fn max_line_length(self, max_length: Option<usize>) -> Self
pub const fn max_line_length(self, max_length: Option<usize>) -> Self
Set maximum line length for response header lines and chunked body headers.
Sourcepub const fn max_header_field_length(self, max_length: Option<usize>) -> Self
pub const fn max_header_field_length(self, max_length: Option<usize>) -> Self
Set maximum header field length.
Sourcepub const fn max_header_fields(self, max_fields: Option<usize>) -> Self
pub const fn max_header_fields(self, max_fields: Option<usize>) -> Self
Set maximum number of lines for the response header.
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