pub struct OutgoingRequestBuilder { /* private fields */ }
Available on crate feature
client
only.Expand description
Builder for outgoing HTTP requests.
Implementations§
Source§impl OutgoingRequestBuilder
impl OutgoingRequestBuilder
Sourcepub fn set_version(self, version: Version) -> Self
pub fn set_version(self, version: Version) -> Self
Set protocol version.
Sourcepub fn set_method(self, method: Method) -> Self
pub fn set_method(self, method: Method) -> Self
Set request method.
Sourcepub fn set_header_field<T>(self, field: T) -> Selfwhere
T: Into<HeaderField>,
pub fn set_header_field<T>(self, field: T) -> Selfwhere
T: Into<HeaderField>,
Replace the current header fields having the same name (if any).
Sourcepub fn add_header_field<T>(self, field: T) -> Selfwhere
T: Into<HeaderField>,
pub fn add_header_field<T>(self, field: T) -> Selfwhere
T: Into<HeaderField>,
Add a given header field.
Sourcepub fn remove_header_field<N>(self, name: &N) -> Self
pub fn remove_header_field<N>(self, name: &N) -> Self
Remove all header fields with a given name.
Sourcepub fn body<B>(self, body: B) -> OutgoingRequest<B>
pub fn body<B>(self, body: B) -> OutgoingRequest<B>
Build the request.
Auto Trait Implementations§
impl !Freeze for OutgoingRequestBuilder
impl RefUnwindSafe for OutgoingRequestBuilder
impl Send for OutgoingRequestBuilder
impl Sync for OutgoingRequestBuilder
impl Unpin for OutgoingRequestBuilder
impl UnwindSafe for OutgoingRequestBuilder
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