pub struct RequestBuilder { /* private fields */ }Implementations§
Source§impl RequestBuilder
impl RequestBuilder
pub fn initiator(self, page: impl IntoUrl) -> Self
pub fn tag(self, tag: impl Into<String>) -> Self
pub fn error_for_status(self) -> Self
pub async fn read_until<F>(self, limit: usize, done: F) -> Result<PrefixRead>
pub async fn download( self, path: impl AsRef<Path>, limit: Option<u64>, ) -> Result<u64>
Source§impl RequestBuilder
impl RequestBuilder
pub fn timeout(self, config: impl Into<TimeoutConfig>) -> Self
pub fn preset(self, preset: Preset) -> Self
pub fn header_order(self, order: &[&str]) -> Self
pub fn body(self, body: impl Into<Body>) -> Self
pub fn json(self, value: &impl Serialize) -> Self
pub fn form<I, P>(self, params: I) -> Selfwhere
I: IntoIterator<Item = P>,
P: IntoParamPair,
pub fn stream(self) -> Self
pub fn compress(self, encoding: ContentEncoding) -> Self
pub fn query<I, P>(self, params: I) -> Selfwhere
I: IntoIterator<Item = P>,
P: IntoParamPair,
pub fn header( self, name: impl TryInto<HeaderName>, value: impl TryInto<HeaderValue>, ) -> Self
pub fn headers<I, P>(self, headers: I) -> Selfwhere
I: IntoIterator<Item = P>,
P: IntoParamPair,
pub fn anchored( self, anchor: HeaderAnchor, name: impl TryInto<HeaderName>, value: impl TryInto<HeaderValue>, ) -> Self
pub fn bearer_auth(self, token: &str) -> Self
pub fn basic_auth(self, username: &str, password: &str) -> Self
pub fn retry(self, policy: RetryPolicy) -> Self
pub fn redirect(self, policy: RedirectPolicy) -> Self
pub fn digest_auth(self, auth: DigestAuth) -> Self
pub fn multipart(self, form: Form) -> Self
pub fn proxy(self, config: impl Into<ProxyConfig>) -> Self
Trait Implementations§
Source§impl Debug for RequestBuilder
impl Debug for RequestBuilder
Source§impl IntoFuture for RequestBuilder
impl IntoFuture for RequestBuilder
Source§type IntoFuture = Pin<Box<dyn Future<Output = <RequestBuilder as IntoFuture>::Output> + Send>>
type IntoFuture = Pin<Box<dyn Future<Output = <RequestBuilder as IntoFuture>::Output> + Send>>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl !Freeze for RequestBuilder
impl !RefUnwindSafe for RequestBuilder
impl !Sync for RequestBuilder
impl !UnwindSafe for RequestBuilder
impl Send 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