pub trait HttpGetClient: Sync {
type Err: Error + Send + Sync + 'static;
// Required method
fn get(
&self,
url: &str,
) -> impl Future<Output = Result<Response, Self::Err>> + Send;
}Expand description
Interface providing functionality of sending HTTP GET request. Motivation for introducing this abstraction is to allow an implementation of a more secure HTTP Client which could prevent malicious URL injections (e.g. by whitelisting hosts).
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".