pub struct HttpAgentBuilder { /* private fields */ }Available on crate features
client and http only.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.
Sourcepub fn allow_insecure_http(self, allow: bool) -> Self
pub fn allow_insecure_http(self, allow: bool) -> Self
Allows configured headers or URL credentials on a remote HTTP endpoint.
See HttpTransportBuilder::allow_insecure_http.
Trait Implementations§
Source§impl Clone for HttpAgentBuilder
impl Clone for HttpAgentBuilder
Auto Trait Implementations§
impl !RefUnwindSafe for HttpAgentBuilder
impl !UnwindSafe for HttpAgentBuilder
impl Forget for HttpAgentBuilder
impl Freeze for HttpAgentBuilder
impl Move 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