pub trait Client<B>{
// Required method
fn send(
&self,
req: Request<B>,
) -> impl Future<Output = Result<Response<Incoming>, Error>> + Send;
}Expand description
An HTTP client that can asynchronously send requests and receive responses.
This trait is HTTP version agnostic; it can be implemented for any version of HTTP.
Version-specific features, such as connecting to a server or the HTTP/1.1 protocol upgrade
mechanism, must be implemented individually for concrete implementations in addition to the
send method.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".