pub struct ReqwestMiddlewareClient(/* private fields */);Available on crate features
reqwest-middleware-native-tls or reqwest-middleware-rustls only.Expand description
A configured middleware client implementing HttpClientExt.
Build the inner client with reqwest_middleware::ClientBuilder, then wrap
it with From<ClientWithMiddleware>.
Implementations§
Source§impl ReqwestMiddlewareClient
impl ReqwestMiddlewareClient
Sourcepub fn into_inner(self) -> ClientWithMiddleware
pub fn into_inner(self) -> ClientWithMiddleware
Take the inner client back.
Trait Implementations§
Source§impl AsRef<ClientWithMiddleware> for ReqwestMiddlewareClient
impl AsRef<ClientWithMiddleware> for ReqwestMiddlewareClient
Source§fn as_ref(&self) -> &ClientWithMiddleware
fn as_ref(&self) -> &ClientWithMiddleware
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for ReqwestMiddlewareClient
impl Clone for ReqwestMiddlewareClient
Source§impl Debug for ReqwestMiddlewareClient
impl Debug for ReqwestMiddlewareClient
Source§impl From<ClientWithMiddleware> for ReqwestMiddlewareClient
impl From<ClientWithMiddleware> for ReqwestMiddlewareClient
Source§fn from(client: ClientWithMiddleware) -> Self
fn from(client: ClientWithMiddleware) -> Self
Converts to this type from the input type.
Source§impl HttpClientExt for ReqwestMiddlewareClient
impl HttpClientExt for ReqwestMiddlewareClient
Source§fn send<T, U>(
&self,
req: Request<T>,
) -> impl Future<Output = Result<Response<LazyBody<U>>>> + WasmCompatSend + 'static
fn send<T, U>( &self, req: Request<T>, ) -> impl Future<Output = Result<Response<LazyBody<U>>>> + WasmCompatSend + 'static
Sends a request and returns headers with a lazy body converted from bytes to
U.Source§fn send_multipart<U>(
&self,
req: Request<MultipartForm>,
) -> impl Future<Output = Result<Response<LazyBody<U>>>> + WasmCompatSend + 'static
fn send_multipart<U>( &self, req: Request<MultipartForm>, ) -> impl Future<Output = Result<Response<LazyBody<U>>>> + WasmCompatSend + 'static
Sends a multipart request and returns headers with a lazy body converted to
U.Source§fn send_streaming<T>(
&self,
req: Request<T>,
) -> impl Future<Output = Result<StreamingResponse>> + WasmCompatSend
fn send_streaming<T>( &self, req: Request<T>, ) -> 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 ReqwestMiddlewareClient
impl !UnwindSafe for ReqwestMiddlewareClient
impl Freeze for ReqwestMiddlewareClient
impl Send for ReqwestMiddlewareClient
impl Sync for ReqwestMiddlewareClient
impl Unpin for ReqwestMiddlewareClient
impl UnsafeUnpin for ReqwestMiddlewareClient
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