pub trait Request<B: HttpBody>: Send {
// Required methods
fn version(&self) -> Version;
fn method(&self) -> &Method;
fn uri(&self) -> &Uri;
fn headers(&self) -> &HeaderMap;
fn send(
self,
headers: Option<HeaderMap>,
) -> impl Future<Output = Result<Response<B>>> + Send;
}
Expand description
An abstraction of an HTTP request.
This trait is used in HTTP middleware integrations to abstract the request type and sending the request upstream.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.