-
Notifications
You must be signed in to change notification settings - Fork 8
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
Decompress response body string if it was compressed #59
Conversation
rmstar
commented
Feb 10, 2023
- getResponseBodyAsString() now returns uncompressed data if response was compressed using gzip or deflate
- Added new API getUncompressedResponseBody() that returns uncompressed response as bytes if it was response was compressed
- Upgraded checkstyle version (now using same version as cdap repo) and fixed checkstyle issues
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.
Also please add a unit test
common-cli/pom.xml
Outdated
@@ -22,7 +22,7 @@ the License. | |||
<parent> | |||
<artifactId>common</artifactId> | |||
<groupId>io.cdap.common</groupId> | |||
<version>0.13.0-SNAPSHOT</version> | |||
<version>0.13.1</version> |
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.
Please put "-SNAPSHOT until after released
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.
reverted
throw new IllegalStateException(String.format("Failed to decompress %s encoded response body", encoding), e); | ||
} | ||
|
||
throw new IllegalArgumentException("Unsupported content encoding " + encoding); |
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.
Use IllegalStateException
as it's not an argument
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.
fixed
added test |
Cherrypick #59 and version bump