Skip to content

[GH-1464] Add appendHeader that supports Literals#1781

Merged
kdavisk6 merged 1 commit into
OpenFeign:masterfrom
kdavisk6:gh-1464-header-literals
Oct 6, 2022
Merged

[GH-1464] Add appendHeader that supports Literals#1781
kdavisk6 merged 1 commit into
OpenFeign:masterfrom
kdavisk6:gh-1464-header-literals

Conversation

@kdavisk6

@kdavisk6 kdavisk6 commented Oct 6, 2022

Copy link
Copy Markdown
Member

This change adds a new appendHeader internal method to RequestTemplate allowing for already resolved headers to be added to the resolved RequestTemplate preventing duplicate expression processing by using another new method HeaderTemplate.literal and HeaderTemplate.appendLiteral respectively.

I chose this route as it isolates the change to be applied only after the original HeaderTemplate has been resolved. While it does expose new public HeaderTemplate APIs, I feel that is an OK trade off, allowing a new escape-hatch for situations where URI template processing is not acceptable for Header values.

This change adds a new `appendHeader` internal method to `RequestTemplate`
allowing for already resolved headers to be added to the resolved `RequestTemplate`
preventing duplicate expression processing by using another new method
`HeaderTemplate.literal` and `HeaderTemplate.appendLiteral` respectively.

I chose this route as it isolates the change to be applied only after the
original `HeaderTemplate` has been resolved.  While it does expose new
public `HeaderTemplate` APIs, I feel that is an OK trade off, allowing
a new escape-hatch for situations where URI template processing is not
acceptable for Header values.
@kdavisk6 kdavisk6 merged commit 92b2f51 into OpenFeign:master Oct 6, 2022
@kdavisk6 kdavisk6 deleted the gh-1464-header-literals branch October 6, 2022 23:48
velo pushed a commit that referenced this pull request Oct 7, 2024
This change adds a new `appendHeader` internal method to `RequestTemplate`
allowing for already resolved headers to be added to the resolved `RequestTemplate`
preventing duplicate expression processing by using another new method
`HeaderTemplate.literal` and `HeaderTemplate.appendLiteral` respectively.

I chose this route as it isolates the change to be applied only after the
original `HeaderTemplate` has been resolved.  While it does expose new
public `HeaderTemplate` APIs, I feel that is an OK trade off, allowing
a new escape-hatch for situations where URI template processing is not
acceptable for Header values.
velo pushed a commit that referenced this pull request Oct 8, 2024
This change adds a new `appendHeader` internal method to `RequestTemplate`
allowing for already resolved headers to be added to the resolved `RequestTemplate`
preventing duplicate expression processing by using another new method
`HeaderTemplate.literal` and `HeaderTemplate.appendLiteral` respectively.

I chose this route as it isolates the change to be applied only after the
original `HeaderTemplate` has been resolved.  While it does expose new
public `HeaderTemplate` APIs, I feel that is an OK trade off, allowing
a new escape-hatch for situations where URI template processing is not
acceptable for Header values.
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