Is your feature request related to a problem? Please describe.
I'm currently upgrading from warp 0.3 and have hit a roadblock in a route where I stream a file from the network to the response body. Previously I used a hyper::Body::channel() for that, which doesn't exist anymore in hyper v1.
Describe the solution you'd like
I've been trying to implement an alternative using http_body_util or tokio_stream that might look like this:
let (sender, receiver) = mpsc::channel::<Result<Bytes, Error>>(16);
let body = warp::body::Body::wrap_stream(ReceiverStream::new(receiver));
problem is that bodyt is private, otherwise it seems that would be a possible solution
Describe alternatives you've considered
Bypass warp for this route entirely and handle it in a hyper service fn instead but I'd prefer not to.
Is your feature request related to a problem? Please describe.
I'm currently upgrading from warp 0.3 and have hit a roadblock in a route where I stream a file from the network to the response body. Previously I used a
hyper::Body::channel()for that, which doesn't exist anymore in hyper v1.Describe the solution you'd like
I've been trying to implement an alternative using
http_body_utilortokio_streamthat might look like this:problem is that
bodytis private, otherwise it seems that would be a possible solutionDescribe alternatives you've considered
Bypass warp for this route entirely and handle it in a hyper service fn instead but I'd prefer not to.