pub struct SteamRequestBuilder { /* private fields */ }Expand description
A wrapper around request builder that automatically appends the session ID to POST data.
Implementations§
Source§impl SteamRequestBuilder
impl SteamRequestBuilder
Sourcepub fn form<T: Serialize + ?Sized>(self, form: &T) -> Self
pub fn form<T: Serialize + ?Sized>(self, form: &T) -> Self
Adds a form body to the request.
If a session ID is available, it is automatically injected as
sessionid and sessionID into the form data.
Sourcepub fn multipart(self, form: Form) -> Self
pub fn multipart(self, form: Form) -> Self
Adds a multipart form body to the request.
If a session ID is available, it is automatically appended to the multipart data.
Sourcepub fn query<T: Serialize + ?Sized>(self, query: &T) -> Self
pub fn query<T: Serialize + ?Sized>(self, query: &T) -> Self
Adds a query parameter to the request.
Sourcepub fn header<K, V>(self, key: K, value: V) -> Selfwhere
HeaderName: TryFrom<K>,
<HeaderName as TryFrom<K>>::Error: Into<Error>,
HeaderValue: TryFrom<V>,
<HeaderValue as TryFrom<V>>::Error: Into<Error>,
pub fn header<K, V>(self, key: K, value: V) -> Selfwhere
HeaderName: TryFrom<K>,
<HeaderName as TryFrom<K>>::Error: Into<Error>,
HeaderValue: TryFrom<V>,
<HeaderValue as TryFrom<V>>::Error: Into<Error>,
Adds a header to the request.
Auto Trait Implementations§
impl !Freeze for SteamRequestBuilder
impl !RefUnwindSafe for SteamRequestBuilder
impl Send for SteamRequestBuilder
impl Sync for SteamRequestBuilder
impl Unpin for SteamRequestBuilder
impl UnsafeUnpin for SteamRequestBuilder
impl !UnwindSafe for SteamRequestBuilder
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
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