-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Router should support request body types other than hyper::Body #905
Comments
Agreed we can make this change. I believe we should do this in conjunction with #830 |
I am going to remove this from 0.7 because it will be quite challenging to get this change in right now and I would actually like to refactor the |
Is it actually possible? Hyper requires services accept |
You can install layers between hyper and the tonic service that change the body type. |
Yes that's what I meant. |
So then it's totally possible to create a Hyper service that changes the request body type and then feeds that modified body type into the Tonic Router, except that Router won't let you do that. |
This would be extremely helpful for a particular issue I'm working on. As @sfackler points out, the major sticking point seems to be where I'd be interested in trying to work on/submit a PR for this. Is this something you'd be receptive to, given the thoughts/plans around breaking |
The generated server Service implementations already support arbitrary request body types, but Router is currently hardcoded to work with hyper::Body directly. It'd be great if that were relaxed to work with any suitable body type.
The text was updated successfully, but these errors were encountered: