pub struct AsyncRequestBuilder<'a> { /* private fields */ }Available on crate feature
http2 only.Expand description
Builder for an async HTTP request.
Implementations§
Source§impl<'a> AsyncRequestBuilder<'a>
impl<'a> AsyncRequestBuilder<'a>
Sourcepub fn form(self, pairs: &[(&str, &str)]) -> Self
pub fn form(self, pairs: &[(&str, &str)]) -> Self
Set an application/x-www-form-urlencoded body from key/value
pairs (sets Content-Type: application/x-www-form-urlencoded).
Sourcepub fn timeout_ms(self, ms: u64) -> Self
pub fn timeout_ms(self, ms: u64) -> Self
Override the timeout for this request.
Sourcepub async fn send(self) -> Result<Response, HttpClientError>
pub async fn send(self) -> Result<Response, HttpClientError>
Send the request asynchronously.
Auto Trait Implementations§
impl<'a> Freeze for AsyncRequestBuilder<'a>
impl<'a> RefUnwindSafe for AsyncRequestBuilder<'a>
impl<'a> Send for AsyncRequestBuilder<'a>
impl<'a> Sync for AsyncRequestBuilder<'a>
impl<'a> Unpin for AsyncRequestBuilder<'a>
impl<'a> UnsafeUnpin for AsyncRequestBuilder<'a>
impl<'a> UnwindSafe for AsyncRequestBuilder<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more