pub struct FrozenSendBuilder { /* private fields */ }Expand description
Builder that allows to modify extra headers.
Implementations§
Source§impl FrozenSendBuilder
impl FrozenSendBuilder
Sourcepub fn extra_header<K, V>(self, key: K, value: V) -> Selfwhere
HeaderName: TryFrom<K>,
HeaderValue: TryFrom<V>,
<HeaderName as TryFrom<K>>::Error: Into<HttpError>,
<HeaderValue as TryFrom<V>>::Error: Into<HttpError>,
pub fn extra_header<K, V>(self, key: K, value: V) -> Selfwhere
HeaderName: TryFrom<K>,
HeaderValue: TryFrom<V>,
<HeaderName as TryFrom<K>>::Error: Into<HttpError>,
<HeaderValue as TryFrom<V>>::Error: Into<HttpError>,
Insert a header, it overrides existing header in FrozenClientRequest.
Sourcepub async fn send_body<B>(
self,
body: B,
) -> Result<ClientResponse, SendRequestError>
pub async fn send_body<B>( self, body: B, ) -> Result<ClientResponse, SendRequestError>
Complete request construction and send a body.
Sourcepub async fn send_json<T: Serialize>(
self,
value: &T,
) -> Result<ClientResponse, SendRequestError>
pub async fn send_json<T: Serialize>( self, value: &T, ) -> Result<ClientResponse, SendRequestError>
Complete request construction and send a json body.
Sourcepub async fn send_form<T: Serialize>(
self,
value: &T,
) -> Result<ClientResponse, SendRequestError>
pub async fn send_form<T: Serialize>( self, value: &T, ) -> Result<ClientResponse, SendRequestError>
Complete request construction and send an urlencoded body.
Sourcepub async fn send_stream<S, E>(
self,
stream: S,
) -> Result<ClientResponse, SendRequestError>
pub async fn send_stream<S, E>( self, stream: S, ) -> Result<ClientResponse, SendRequestError>
Complete request construction and send a streaming body.
Sourcepub async fn send(self) -> Result<ClientResponse, SendRequestError>
pub async fn send(self) -> Result<ClientResponse, SendRequestError>
Complete request construction and send an empty body.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FrozenSendBuilder
impl !RefUnwindSafe for FrozenSendBuilder
impl !Send for FrozenSendBuilder
impl !Sync for FrozenSendBuilder
impl Unpin for FrozenSendBuilder
impl !UnwindSafe for FrozenSendBuilder
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