Make sure all middleware implement Service<Request<ReqBody>>
and require Response = Response<ResBody>
#164
Milestone
Service<Request<ReqBody>>
and require Response = Response<ResBody>
#164
For maximum flexibility in the future I think it makes sense to always implement
Service
like this:That is they require the request type to be
http::Request<_>
and require the response of the inner service to behttp::Response<_>
.If you only implement
Service<R>
then you don't have access to headers or extensions which might be necessary for implementing new features, same goes for the response. Case and point #156 which is a breaking change. That could have been avoided hadServeFile
implementedService<Request<_>>
For 0.2 I think we should go through all services fix this.
The text was updated successfully, but these errors were encountered: