pub trait HttpRequest {
// Required method
fn request(
&mut self,
req: Request<Body>,
) -> BoxFuture<'_, Result<Response<Vec<u8>>, Error>>;
}
Expand description
A trait for providing HTTP capabilities to the StateMachine.
This trait is a wrapper around Hyper, to provide a simple request->response style of API for the state machine to use.
In particular, it’s meant to be easy to mock for tests.