pub struct RequestBuilder { /* private fields */ }Expand description
HTTP request builder for complex requests
Implementations§
Source§impl RequestBuilder
impl RequestBuilder
Sourcepub fn header(self, key: impl AsRef<str>, value: impl AsRef<str>) -> Self
pub fn header(self, key: impl AsRef<str>, value: impl AsRef<str>) -> Self
Add a header to the request
Sourcepub async fn send(self) -> Response<RawResponse>
pub async fn send(self) -> Response<RawResponse>
Send the request and return a raw response
Sourcepub async fn send_json<R: DeserializeOwned>(self) -> Response<R>
pub async fn send_json<R: DeserializeOwned>(self) -> Response<R>
Send the request and deserialize the response as JSON
Trait Implementations§
Auto 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