pub struct RequestBuilder { /* private fields */ }Expand description
Implementations§
Source§impl RequestBuilder
impl RequestBuilder
Sourcepub fn url(self, url: impl IntoUrl) -> Self
pub fn url(self, url: impl IntoUrl) -> Self
Sets the request URL. Required; the scheme must be https.
Sourcepub fn header<K, V>(self, key: K, value: V) -> Selfwhere
K: TryInto<HeaderName>,
K::Error: Into<Error>,
V: TryInto<HeaderValue>,
V::Error: Into<Error>,
pub fn header<K, V>(self, key: K, value: V) -> Selfwhere
K: TryInto<HeaderName>,
K::Error: Into<Error>,
V: TryInto<HeaderValue>,
V::Error: Into<Error>,
Appends a header.
Sourcepub fn body(self, body: impl Into<Bytes>) -> Self
pub fn body(self, body: impl Into<Bytes>) -> Self
Sets the request body. Bodies are buffered; they are sent in full and can be replayed if connection establishment has to be repeated.
Sourcepub fn request_timeout(self, timeout: Duration) -> Self
pub fn request_timeout(self, timeout: Duration) -> Self
Overrides the client’s request timeout for this request.
One deadline covering establishment, the response head, and body
collection; raise it for a response the caller will not collect right
away (see Response).
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for RequestBuilder
impl !RefUnwindSafe for RequestBuilder
impl !UnwindSafe for RequestBuilder
impl Send for RequestBuilder
impl Sync for RequestBuilder
impl Unpin for RequestBuilder
impl UnsafeUnpin for RequestBuilder
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