Struct awc::FrozenClientRequest [−][src]
pub struct FrozenClientRequest { /* fields omitted */ }
Expand description
FrozenClientRequest
struct represents clonable client request.
It could be used to send same request multiple times.
Implementations
Get HTTP method of this request
pub fn send_body<B>(&self, body: B) -> SendClientRequestⓘNotable traits for SendClientRequestimpl Future for SendClientRequest type Output = Result<ClientResponse<Decoder<Payload<PayloadStream>>>, SendRequestError>;
where
B: Into<Body>,
pub fn send_body<B>(&self, body: B) -> SendClientRequestⓘNotable traits for SendClientRequestimpl Future for SendClientRequest type Output = Result<ClientResponse<Decoder<Payload<PayloadStream>>>, SendRequestError>;
where
B: Into<Body>,
Notable traits for SendClientRequest
impl Future for SendClientRequest type Output = Result<ClientResponse<Decoder<Payload<PayloadStream>>>, SendRequestError>;
Send a body.
pub fn send_json<T: Serialize>(&self, value: &T) -> SendClientRequestⓘNotable traits for SendClientRequestimpl Future for SendClientRequest type Output = Result<ClientResponse<Decoder<Payload<PayloadStream>>>, SendRequestError>;
pub fn send_json<T: Serialize>(&self, value: &T) -> SendClientRequestⓘNotable traits for SendClientRequestimpl Future for SendClientRequest type Output = Result<ClientResponse<Decoder<Payload<PayloadStream>>>, SendRequestError>;
Notable traits for SendClientRequest
impl Future for SendClientRequest type Output = Result<ClientResponse<Decoder<Payload<PayloadStream>>>, SendRequestError>;
Send a json body.
pub fn send_form<T: Serialize>(&self, value: &T) -> SendClientRequestⓘNotable traits for SendClientRequestimpl Future for SendClientRequest type Output = Result<ClientResponse<Decoder<Payload<PayloadStream>>>, SendRequestError>;
pub fn send_form<T: Serialize>(&self, value: &T) -> SendClientRequestⓘNotable traits for SendClientRequestimpl Future for SendClientRequest type Output = Result<ClientResponse<Decoder<Payload<PayloadStream>>>, SendRequestError>;
Notable traits for SendClientRequest
impl Future for SendClientRequest type Output = Result<ClientResponse<Decoder<Payload<PayloadStream>>>, SendRequestError>;
Send an urlencoded body.
pub fn send_stream<S, E>(&self, stream: S) -> SendClientRequestⓘNotable traits for SendClientRequestimpl Future for SendClientRequest type Output = Result<ClientResponse<Decoder<Payload<PayloadStream>>>, SendRequestError>;
where
S: Stream<Item = Result<Bytes, E>> + Unpin + 'static,
E: Into<Error> + 'static,
pub fn send_stream<S, E>(&self, stream: S) -> SendClientRequestⓘNotable traits for SendClientRequestimpl Future for SendClientRequest type Output = Result<ClientResponse<Decoder<Payload<PayloadStream>>>, SendRequestError>;
where
S: Stream<Item = Result<Bytes, E>> + Unpin + 'static,
E: Into<Error> + 'static,
Notable traits for SendClientRequest
impl Future for SendClientRequest type Output = Result<ClientResponse<Decoder<Payload<PayloadStream>>>, SendRequestError>;
Send a streaming body.
pub fn send(&self) -> SendClientRequestⓘNotable traits for SendClientRequestimpl Future for SendClientRequest type Output = Result<ClientResponse<Decoder<Payload<PayloadStream>>>, SendRequestError>;
pub fn send(&self) -> SendClientRequestⓘNotable traits for SendClientRequestimpl Future for SendClientRequest type Output = Result<ClientResponse<Decoder<Payload<PayloadStream>>>, SendRequestError>;
Notable traits for SendClientRequest
impl Future for SendClientRequest type Output = Result<ClientResponse<Decoder<Payload<PayloadStream>>>, SendRequestError>;
Send an empty body.
Create a FrozenSendBuilder
with extra headers
pub fn extra_header<K, V>(&self, key: K, value: V) -> FrozenSendBuilder where
HeaderName: TryFrom<K>,
<HeaderName as TryFrom<K>>::Error: Into<HttpError>,
V: IntoHeaderValue,
pub fn extra_header<K, V>(&self, key: K, value: V) -> FrozenSendBuilder where
HeaderName: TryFrom<K>,
<HeaderName as TryFrom<K>>::Error: Into<HttpError>,
V: IntoHeaderValue,
Create a FrozenSendBuilder
with an extra header
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for FrozenClientRequest
impl !Send for FrozenClientRequest
impl !Sync for FrozenClientRequest
impl Unpin for FrozenClientRequest
impl !UnwindSafe for FrozenClientRequest
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more