-
Notifications
You must be signed in to change notification settings - Fork 25
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
feat: add support for compressing request bodies #111
Conversation
b612cc0
to
620eccd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a couple things that need to be addressed, plus we should also support enabling gzip compression via an external config property... e.g. MYSERVICE_ENABLE_GZIP=true
.
620eccd
to
1f18fe3
Compare
All feedback should now be addressed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless I mis-read something, I think there's an issue with the handling of the <service>_ENABLE_GZIP
config property. And I had one other comment re: checking the Content-Encoding header as part of the successful tests.
a flag can be passed to the BaseService that will enable gzip compression on the request body data
1f18fe3
to
eab2ccd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Looks like Phil covered the concerns I had.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
# [2.7.0](v2.6.0...v2.7.0) (2020-10-06) ### Features * add support for compressing request bodies ([#111](#111)) ([7692d71](7692d71))
🎉 This PR is included in version 2.7.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
A flag can now be passed to the BaseService that will enable gzip compression on the request body data. This flag is passed down to the RequestWrapper class where the compression code lives. Note that no code needs to be changed in the BaseService - the options passed into its constructor will be carried through to the RequestWrapper. In the generated code, I am planning on attaching the flag to the options passed into the BaseService constructor.
If there is a problem during compression, the code moves alone with the request, just uncompressed. If this is not the behavior we want, I can change it.