Struct awc::FrozenClientRequest
source · pub struct FrozenClientRequest { /* private fields */ }
Expand description
FrozenClientRequest
struct represents cloneable client request.
It could be used to send same request multiple times.
Implementations§
source§impl FrozenClientRequest
impl FrozenClientRequest
sourcepub fn get_method(&self) -> &Method
pub fn get_method(&self) -> &Method
Get HTTP method of this request
sourcepub fn send_body<B>(&self, body: B) -> SendClientRequest ⓘwhere
B: MessageBody + 'static,
pub fn send_body<B>(&self, body: B) -> SendClientRequest ⓘwhere
B: MessageBody + 'static,
Send a body.
sourcepub fn send_form<T: Serialize>(&self, value: &T) -> SendClientRequest ⓘ
pub fn send_form<T: Serialize>(&self, value: &T) -> SendClientRequest ⓘ
Send an urlencoded body.
sourcepub fn send_stream<S, E>(&self, stream: S) -> SendClientRequest ⓘ
pub fn send_stream<S, E>(&self, stream: S) -> SendClientRequest ⓘ
Send a streaming body.
sourcepub fn send(&self) -> SendClientRequest ⓘ
pub fn send(&self) -> SendClientRequest ⓘ
Send an empty body.
sourcepub fn extra_headers(&self, extra_headers: HeaderMap) -> FrozenSendBuilder
pub fn extra_headers(&self, extra_headers: HeaderMap) -> FrozenSendBuilder
Clones this FrozenClientRequest
, returning a new one with extra headers added.
sourcepub fn extra_header(&self, header: impl TryIntoHeaderPair) -> FrozenSendBuilder
pub fn extra_header(&self, header: impl TryIntoHeaderPair) -> FrozenSendBuilder
Clones this FrozenClientRequest
, returning a new one with the extra header added.
Trait Implementations§
source§impl Clone for FrozenClientRequest
impl Clone for FrozenClientRequest
source§fn clone(&self) -> FrozenClientRequest
fn clone(&self) -> FrozenClientRequest
Returns a copy of the value. Read more
1.0.0 · 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 Freeze for FrozenClientRequest
impl !RefUnwindSafe for FrozenClientRequest
impl !Send for FrozenClientRequest
impl !Sync for FrozenClientRequest
impl Unpin for FrozenClientRequest
impl !UnwindSafe for FrozenClientRequest
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