pub struct RequestBuilder<'a> { /* private fields */ }Expand description
Builder for an HTTP request.
Implementations§
Source§impl<'a> RequestBuilder<'a>
impl<'a> RequestBuilder<'a>
Sourcepub async fn send(self) -> Result<Response, HttpError>
pub async fn send(self) -> Result<Response, HttpError>
Send the request and return the response.
Sourcepub async fn send_streaming(self) -> Result<StreamingResponse<'a>, HttpError>
pub async fn send_streaming(self) -> Result<StreamingResponse<'a>, HttpError>
Send the request and return a streaming response.
Returns as soon as headers are received. Body chunks are yielded
incrementally via StreamingResponse::next_chunk().
Note: streaming responses do not automatically decompress the body. If the server sends a compressed response, chunks will contain raw compressed bytes. Buffer and decompress manually if needed.
Auto Trait Implementations§
impl<'a> !Freeze for RequestBuilder<'a>
impl<'a> !RefUnwindSafe for RequestBuilder<'a>
impl<'a> !UnwindSafe for RequestBuilder<'a>
impl<'a> Send for RequestBuilder<'a>
impl<'a> Sync for RequestBuilder<'a>
impl<'a> Unpin for RequestBuilder<'a>
impl<'a> UnsafeUnpin for RequestBuilder<'a>
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