Struct awc::FrozenSendBuilder
source · pub struct FrozenSendBuilder { /* private fields */ }
Expand description
Builder that allows to modify extra headers.
Implementations§
source§impl FrozenSendBuilder
impl FrozenSendBuilder
sourcepub fn extra_header(self, header: impl TryIntoHeaderPair) -> Self
pub fn extra_header(self, header: impl TryIntoHeaderPair) -> Self
Insert a header, it overrides existing header in FrozenClientRequest
.
sourcepub fn send_body(self, body: impl MessageBody + 'static) -> SendClientRequest ⓘ
pub fn send_body(self, body: impl MessageBody + 'static) -> SendClientRequest ⓘ
Complete request construction and send a body.
sourcepub fn send_json(self, value: impl Serialize) -> SendClientRequest ⓘ
pub fn send_json(self, value: impl Serialize) -> SendClientRequest ⓘ
Complete request construction and send a json body.
sourcepub fn send_form(self, value: impl Serialize) -> SendClientRequest ⓘ
pub fn send_form(self, value: impl Serialize) -> SendClientRequest ⓘ
Complete request construction and send an urlencoded body.
sourcepub fn send_stream<S, E>(self, stream: S) -> SendClientRequest ⓘwhere
S: Stream<Item = Result<Bytes, E>> + 'static,
E: Into<Box<dyn Error>> + 'static,
pub fn send_stream<S, E>(self, stream: S) -> SendClientRequest ⓘwhere
S: Stream<Item = Result<Bytes, E>> + 'static,
E: Into<Box<dyn Error>> + 'static,
Complete request construction and send a streaming body.
sourcepub fn send(self) -> SendClientRequest ⓘ
pub fn send(self) -> SendClientRequest ⓘ
Complete request construction and send an empty body.