pub trait HttpClient {
type Error: Error + Send + Sync;
// Required method
fn request(
&self,
req: Request<Vec<u8>>,
) -> Result<Response<Vec<u8>>, Self::Error>;
}Expand description
Perform an HTTP request and return the response.
Users of this crate must provide an implementation of this
trait using an HTTP crate such as curl, reqwest, etc.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".