pub struct RequestBuilder { /* private fields */ }
Expand description
HTTP request builder
Implementations§
Source§impl RequestBuilder
impl RequestBuilder
pub fn new(base_url: String, path: String, method: Method) -> Self
Sourcepub fn query(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn query(self, key: impl Into<String>, value: impl Into<String>) -> Self
Add a query parameter
Sourcepub fn path_param(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn path_param( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
Add a path parameter
pub fn method(&self) -> &Method
pub fn headers(&self) -> &HashMap<String, String>
pub fn body(&self) -> Option<&str>
Trait Implementations§
Source§impl Clone for RequestBuilder
impl Clone for RequestBuilder
Source§fn clone(&self) -> RequestBuilder
fn clone(&self) -> RequestBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for RequestBuilder
impl RefUnwindSafe for RequestBuilder
impl Send for RequestBuilder
impl Sync for RequestBuilder
impl Unpin 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