Skip to content

chore(gensupport): merge x-goog-api-client vals into a single header#2612

Merged
BrennaEpp merged 5 commits into
googleapis:mainfrom
BrennaEpp:merge-header
Jun 10, 2024
Merged

chore(gensupport): merge x-goog-api-client vals into a single header#2612
BrennaEpp merged 5 commits into
googleapis:mainfrom
BrennaEpp:merge-header

Conversation

@BrennaEpp

Copy link
Copy Markdown
Contributor

No description provided.

@BrennaEpp BrennaEpp marked this pull request as ready for review June 4, 2024 21:39
@BrennaEpp BrennaEpp requested review from a team, codyoss and tritone June 4, 2024 21:39
@BrennaEpp BrennaEpp changed the title draft(gensupport): merge x-goog-api-client vals into a single header chore(gensupport): merge x-goog-api-client vals into a single header Jun 4, 2024

@quartzmo quartzmo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you expand TestSendRequestHeader (or add a new test) to cover this change?

@BrennaEpp BrennaEpp requested review from quartzmo and shollyman June 6, 2024 20:32

@tritone tritone 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.

Overall looks good; thanks for adding the test.

Comment thread internal/gensupport/send.go Outdated
for _, v := range vals {
req.Header.Add(k, v)
if k != "x-goog-api-client" {
for _, v := range vals {

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.

nit: could you flip this conditional? Seems more readable to have the default case as the "else".

@BrennaEpp BrennaEpp enabled auto-merge (squash) June 10, 2024 20:42
@BrennaEpp BrennaEpp merged commit e760319 into googleapis:main Jun 10, 2024
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.

4 participants