Closed padamstx closed 4 years ago
Looks good so far but I think a few other things are missing:
* Adding code to have gzip enabled via external config * At least 1 tests that tests enabling then disabling gzip
haha, thank goodness someone is paying attention... I completely whiffed on the external config requirement. Completely forgot about it :)
I've added support for external config properties and that also required that I add the EnableGzipCompression flag to the ServiceOptions struct defined in base_service.go (initially I was planning on just adding that to the generated service options struct).
:tada: This PR is included in version 4.6.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
Fixes arf/planning-sdk-squad#2185
This commit adds support for peforming gzip compression of request bodies, and consists of the following:
Two new functions: NewGzipCompressionReader() and NewGzipDecompressionReader(). Each function will wrap an existing io.Reader to provide compression/decompression using a filter pattern.
A new field "EnableGzipCompression" was added to the RequestBuilder struct to indicate whether or not request bodies should be gzip-compressed.
RequestBuilder.Build() was updated to honor the new flag and (if enabled) wrap the Body field in a gzip compression filter prior to constructing the http.Request instance.