-
Notifications
You must be signed in to change notification settings - Fork 148
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
Decompression service decompress the request #276
Comments
This has been requested before but the question has always been how to handle unsupported encodings. About
So I suppose we could do just do that. Most of machinery is already there so this is probably not hard. |
@davidpdrsn I did manage to make it work for us with the following changes (although 1 example and tests do not compile with some type errors). It doesn't handle the unsupported content-encoding though. |
I think we have to add a new middleware. Changing the trait bounds like that is a breaking change. |
I have created a branch with decompression middleware for request bodies. It still needs documentation and refactoring/naming to coexist with the other Decompression middleware. -- I refactored the decompression module, but I am not sure if this is the correct way. I have renamed And to return Unsupported Media Type, would I need a separate ResponseFuture? |
Given that #282 is merged and released, I think this issue can be closed as well? |
Yes! |
Feature Request
Add request decompression to the
Decompression
service. This would be used on the server-side to decompress client requests, in addition to the existing logic to decompress server responses.Motivation
In our company, we are using Axum for our internal APIs and posting large JSON payloads. While we are planning to move to some more space-efficient formats, it would help a lot if we could compress the client request body using standard compression methods (gzip, deflate, br).
Proposal
Implement decompression for the requests based on the
Content-Encoding
headerAlternatives
Possibly create a separate service/layer for this?
The text was updated successfully, but these errors were encountered: