pub struct Request {
pub body: Option<String>,
pub headers: Option<HeaderMap<HeaderValue>>,
pub method: Method,
pub path: String,
pub use_authorization_token: bool,
pub params: Option<HashMap<String, String>>,
}Fields§
§body: Option<String>§headers: Option<HeaderMap<HeaderValue>>§method: Method§path: String§params: Option<HashMap<String, String>>Implementations§
Source§impl Request
impl Request
Sourcepub fn builder() -> RequestBuilder
pub fn builder() -> RequestBuilder
Create an instance of Request using the builder syntax
Source§impl Request
impl Request
Sourcepub async fn execute(self, client: &HttpClient) -> Result<Response, Error>
pub async fn execute(self, client: &HttpClient) -> Result<Response, Error>
Execute the request. For a non-consuming version, see Self::borrowed_execute.
§Errors
Returns an error if there was an error while sending the request, a redirect loop was detected or the redirect limit was exhausted.
Sourcepub async fn borrowed_execute(
&self,
client: &HttpClient,
) -> Result<Response, Error>
pub async fn borrowed_execute( &self, client: &HttpClient, ) -> Result<Response, Error>
Execute the request without consuming it. This clones certain fields when necessary. For a consuming version, see Self::execute.
§Errors
Returns the same errors as Self::execute.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnsafeUnpin for Request
impl UnwindSafe for Request
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