pub struct ReqwestClient(/* private fields */);Expand description
A reqwest client implementing HttpClientExt.
Default is the process-wide client, built once and shared by every
clone; From<reqwest::Client> wraps a configured client and keeps its
connection pool. Non-success responses retain at most 64 KiB of body bytes,
with a truncation marker only after observing excess data. Partial diagnostic
text survives body read failures; the client’s timeout policy governs reads.
On native targets, Default’s client follows a redirect to another origin
(scheme, host or port) with only harmless headers, so no credential reaches
it. A browser follows redirects itself, so wasm lacks this protection, as do
a client from From<reqwest::Client> and a ReqwestMiddlewareClient, which
keep their own policy.
Implementations§
Source§impl ReqwestClient
impl ReqwestClient
Trait Implementations§
Source§impl Clone for ReqwestClient
impl Clone for ReqwestClient
Source§impl Debug for ReqwestClient
impl Debug for ReqwestClient
Source§impl Default for ReqwestClient
impl Default for ReqwestClient
Source§impl From<Client> for ReqwestClient
impl From<Client> for ReqwestClient
Source§impl HttpClientExt for ReqwestClient
impl HttpClientExt for ReqwestClient
Source§fn send(
&self,
req: Request<Bytes>,
) -> impl Future<Output = Result<Response<LazyBody>>> + WasmCompatSend + 'static
fn send( &self, req: Request<Bytes>, ) -> impl Future<Output = Result<Response<LazyBody>>> + WasmCompatSend + 'static
Sends a request and returns headers with a lazy body.
Source§fn send_multipart(
&self,
req: Request<MultipartForm>,
) -> impl Future<Output = Result<Response<LazyBody>>> + WasmCompatSend + 'static
fn send_multipart( &self, req: Request<MultipartForm>, ) -> impl Future<Output = Result<Response<LazyBody>>> + WasmCompatSend + 'static
Sends a multipart request and returns headers with a lazy body.
Source§fn send_streaming(
&self,
req: Request<Bytes>,
) -> impl Future<Output = Result<StreamingResponse>> + WasmCompatSend
fn send_streaming( &self, req: Request<Bytes>, ) -> impl Future<Output = Result<StreamingResponse>> + WasmCompatSend
Sends a request and returns headers with a stream of transport byte chunks.
Auto Trait Implementations§
impl !RefUnwindSafe for ReqwestClient
impl !UnwindSafe for ReqwestClient
impl Forget for ReqwestClient
impl Freeze for ReqwestClient
impl Move for ReqwestClient
impl Send for ReqwestClient
impl Sync for ReqwestClient
impl Unpin for ReqwestClient
impl UnsafeUnpin for ReqwestClient
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