pub struct HttpAgentBuilder { /* private fields */ }Expand description
Builds an HttpAgent: base URL, headers, timeouts.
Implementations§
Source§impl HttpAgentBuilder
impl HttpAgentBuilder
Sourcepub fn header(self, name: impl Into<String>, value: impl Into<String>) -> Self
pub fn header(self, name: impl Into<String>, value: impl Into<String>) -> Self
Adds a header to every request.
Sourcepub fn headers<K, V>(self, headers: impl IntoIterator<Item = (K, V)>) -> Self
pub fn headers<K, V>(self, headers: impl IntoIterator<Item = (K, V)>) -> Self
Adds several headers.
Sourcepub fn connect_timeout(self, timeout: Duration) -> Self
pub fn connect_timeout(self, timeout: Duration) -> Self
Bounds connection setup only, leaving the stream unbounded.
Trait Implementations§
Source§impl Clone for HttpAgentBuilder
impl Clone for HttpAgentBuilder
Source§fn clone(&self) -> HttpAgentBuilder
fn clone(&self) -> HttpAgentBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for HttpAgentBuilder
impl !UnwindSafe for HttpAgentBuilder
impl Freeze for HttpAgentBuilder
impl Send for HttpAgentBuilder
impl Sync for HttpAgentBuilder
impl Unpin for HttpAgentBuilder
impl UnsafeUnpin for HttpAgentBuilder
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