pub trait HttpService<B>: Sealed<B> {
type ResponseBody: Body;
type Error;
type Future: Future<Output = Result<Response<Self::ResponseBody>, Self::Error>>;
// Required methods
fn poll_ready(
&mut self,
cx: &mut Context<'_>,
) -> Poll<Result<(), Self::Error>>;
fn call(&mut self, request: Request<B>) -> Self::Future;
}
Expand description
An HTTP client (like hyper::Client
).
This is just an alias for tower_service::Service
introduced to reduce the number of type
parameters.
Required Associated Types§
Sourcetype ResponseBody: Body
type ResponseBody: Body
Body of the responses given by the service.