-
Notifications
You must be signed in to change notification settings - Fork 64
fix: Use UTF-8 as default charset for HttpJson requests #1477
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
Merged
Merged
Changes from 8 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
72dfefc
chore: Use UTF-8 as default charset for HttpJson
lqiu96 40f2975
Merge branch 'main' into main-httpjson_default_charset
lqiu96 9ffaf32
chore: Update comment documentation
lqiu96 5c6fe18
Merge branch 'main' into main-httpjson_default_charset
lqiu96 3eb90e7
chore: Add comments to test
lqiu96 2774241
chore: Move bodyrequestformatter to the specific test
lqiu96 56632c4
Merge branch 'main' into main-httpjson_default_charset
lqiu96 51d1eda
chore: Move bodyrequestmessage to unit test
lqiu96 d6d3e64
chore(main): release 2.15.4-SNAPSHOT (#1489)
release-please[bot] 4b54422
chore: add aggregate test coverage collection of gax within the showc…
mpeddada1 8c68d35
deps: update netty dependencies to v4.1.90.final (#1490)
renovate-bot 2f9ce66
feat: install compatibility check (#1508)
JoeWang1127 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The fix looks good to me! This makes me think though, we are currently hardcoding all content type to
application/json
, which is fine for now, but it will not work for services like storage in the future. It might be one of the reasons that storage has been a handwritten library. CC @meltsufinThere 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.
For my curiosity: What content-type does Storage use? Wondering if it's as easy as setting the charset or having to create/ modify the HttpMediaType class.
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.
It depends on the use case, in their example, it is set to
text/plain
. We probably need to make it a parameter in the future and set it differently based on the scenario.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.
Sure, I'll create an issue to track this. Might be something that a future GAPIC library needs. Also, don't the handwritten libraries use java-core instead of gax?
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.
They use both, also we are thinking about reducing the need of handwritten libraries(including java-core), so this could be one of places. I wouldn't create an issue yet as we don't have the need yet, but something to keep in mind.