pub struct RequestBuilder { /* private fields */ }Expand description
HTTP request builder for complex requests
This is a type alias that resolves to the selected native backend request
builder, or WasmRequestBuilder on wasm.
bitreq-based RequestBuilder wrapper
Implementations§
Source§impl BitreqRequestBuilder
impl BitreqRequestBuilder
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 BitreqRequestBuilder
impl RefUnwindSafe for BitreqRequestBuilder
impl Send for BitreqRequestBuilder
impl Sync for BitreqRequestBuilder
impl Unpin for BitreqRequestBuilder
impl UnsafeUnpin for BitreqRequestBuilder
impl UnwindSafe for BitreqRequestBuilder
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