pub struct RequestBuilder { /* private fields */ }Expand description
API HTTP Request
A low-level request builder for API integration decoupled from any specific underlying HTTP library.
Implementations§
Source§impl RequestBuilder
impl RequestBuilder
Sourcepub fn new(method: Method, path: &str) -> Self
pub fn new(method: Method, path: &str) -> Self
Creates a new request builder with method and path
Sourcepub fn params<'a>(
self,
params: impl IntoIterator<Item = (&'a str, &'a str)>,
) -> Self
pub fn params<'a>( self, params: impl IntoIterator<Item = (&'a str, &'a str)>, ) -> Self
Append params to the request’s query string. Parameters may
share the same key, and will result in a query string with one or
more duplicated query parameter keys.
Sourcepub fn credentials(self, credentials: Credentials) -> Self
pub fn credentials(self, credentials: Credentials) -> Self
Sets the API credentials for authentication
Sourcepub fn x_gate_exp_time(self, x_gate_exp_time: u128) -> Self
pub fn x_gate_exp_time(self, x_gate_exp_time: u128) -> Self
Sets the Gate expiration time
Trait Implementations§
Source§impl From<RequestBuilder> for Request
impl From<RequestBuilder> for Request
Source§fn from(builder: RequestBuilder) -> Request
fn from(builder: RequestBuilder) -> Request
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RequestBuilder
impl RefUnwindSafe for RequestBuilder
impl Send for RequestBuilder
impl Sync for RequestBuilder
impl Unpin for RequestBuilder
impl UnsafeUnpin for RequestBuilder
impl UnwindSafe 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