pub trait HttpClientExt: WasmCompatSend + WasmCompatSync {
// Required methods
fn send(
&self,
req: Request<Bytes>,
) -> impl Future<Output = Result<Response<Pin<Box<dyn Future<Output = Result<Bytes, Error>> + Send>>>, Error>> + WasmCompatSend + 'static;
fn send_multipart(
&self,
req: Request<MultipartForm>,
) -> impl Future<Output = Result<Response<Pin<Box<dyn Future<Output = Result<Bytes, Error>> + Send>>>, Error>> + WasmCompatSend + 'static;
fn send_streaming(
&self,
req: Request<Bytes>,
) -> impl Future<Output = Result<Response<Pin<Box<dyn Stream<Item = Result<Bytes, Error>> + Send>>>, Error>> + WasmCompatSend;
}Expand description
An HTTP client Rig sends through: unary, multipart and streaming requests.
rig-reqwest’s ReqwestClient is the bundled implementation; a provider
configuration takes any implementation with connect(client).
Required Methods§
Sourcefn send(
&self,
req: Request<Bytes>,
) -> impl Future<Output = Result<Response<Pin<Box<dyn Future<Output = Result<Bytes, Error>> + Send>>>, Error>> + WasmCompatSend + 'static
fn send( &self, req: Request<Bytes>, ) -> impl Future<Output = Result<Response<Pin<Box<dyn Future<Output = Result<Bytes, Error>> + Send>>>, Error>> + WasmCompatSend + 'static
Sends a request and returns headers with a lazy body.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".