FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat(gax): add getFirstHeader to HttpHeadersUtils by whowes · Pull Request #14137 · googleapis/google-cloud-java · GitHub

feat(gax): add getFirstHeader to HttpHeadersUtils - #14137

Draft
whowes wants to merge 1 commit into
whowes/start-unary-callfrom
whowes/get-first-header
Draft

feat(gax): add getFirstHeader to HttpHeadersUtils#14137
whowes wants to merge 1 commit into
whowes/start-unary-callfrom
whowes/get-first-header

Conversation

whowes commented Aug 19, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

The GAX HTTP/JSON stack stores response headers in a Map<String, Object> where values may be Strings, numbers, Iterables, etc., and header names may vary in casing depending on the HTTP version. This method provides case-insensitive lookup and safely extracts the first string value in a typesafe way.

This will be used in resumable upload support to retrieve protocol header values (e.g. X-Goog-Upload-URL, Location, and X-Goog-Upload-Status).

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Code Review

This pull request introduces a new utility method getFirstHeader in HttpHeadersUtils to retrieve the first string value of a header by case-insensitive name from a headers map, along with a helper method extractFirstString to handle different header value types (such as iterables and non-string objects). Comprehensive unit tests have also been added to cover various scenarios, including case-insensitivity, iterable values, null values, and non-existent headers. There are no review comments, and I have no feedback to provide.

whowes changed the title whowes/get first header feat(gax): add getFirstHeader to HttpHeadersUtils Aug 19, 2026
whowes force-pushed the whowes/get-first-header branch 2 times, most recently from d1c96b2 to b7b5130 Compare August 21, 2026 00:37
whowes force-pushed the whowes/get-first-header branch from b7b5130 to ed5f3b7 Compare August 24, 2026 19:40

Copy link
Copy Markdown

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

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Copy link
Copy Markdown

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

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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
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


Back | FazBrowse Home | New Git URL