Skip to content

feat(gax): allow non-JSON HttpContent in HttpRequestFormatter and HttpRequestRunnable - #14085

Draft
whowes wants to merge 1 commit into
mainfrom
whowes/http-content-support
Draft

feat(gax): allow non-JSON HttpContent in HttpRequestFormatter and HttpRequestRunnable#14085
whowes wants to merge 1 commit into
mainfrom
whowes/http-content-support

Conversation

@whowes

@whowes whowes commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

GAX HTTP infrastructure currently assumes that request content is always JSON. This PR relaxes that assumption to allow non-JSON content, which will be needed for resumable upload support.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a default getHttpContent method to the HttpRequestFormatter interface, allowing formatters to customize the request body content type and payload. It refactors HttpRequestRunnable to delegate content generation to the formatter instead of hardcoding JSON serialization, and adds a unit test to verify support for non-JSON content types like binary payloads. I have no feedback to provide.

@whowes
whowes force-pushed the whowes/http-content-support branch 2 times, most recently from 81ad5bc to 1215616 Compare August 17, 2026 22:22
@whowes
whowes force-pushed the whowes/http-content-support branch from 1215616 to 52795b5 Compare August 17, 2026 23:04
@sonarqubecloud

Copy link
Copy Markdown

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed for 'gapic-generator-java-root'

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant