Or add a new function, if it would otherwise be a breaking change?
Specifically...
Currently in my non-stub (real) hyper server tests, I can use hyper::service::service_fn even when the response body type (body_image::async::UniBodyImage) is different than the request body type (hyper::Body), as in:
I was hoping to be able to do the same thing with your proxy_client_fn, as the logically corollary to service_fn, but the former is not generic over the response body type.
Could that be changed, either in place or with a new function?
Edit: The hyper-stub rustdoc implies that the proxy_client function is the most flexible, but using that looks (thought I'm not entirely sure) a good deal more complicated?
Or add a new function, if it would otherwise be a breaking change?
Specifically...
Currently in my non-stub (real) hyper server tests, I can use
hyper::service::service_fn
even when the response body type (body_image::async::UniBodyImage
) is different than the request body type (hyper::Body
), as in:https://github.com/dekellum/body-image/blob/master/src/async/tests/server.rs#L245
This works because
hyper::server::conn::Http::serve_connection
is generic over the response body type and (above linked)service_fn
doesn't specify the response body type.I was hoping to be able to do the same thing with your
proxy_client_fn
, as the logically corollary toservice_fn
, but the former is not generic over the response body type.Could that be changed, either in place or with a new function?
Edit: The hyper-stub rustdoc implies that the
proxy_client
function is the most flexible, but using that looks (thought I'm not entirely sure) a good deal more complicated?Thanks for your consideration.