Skip to content
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

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

Merged
merged 1 commit into from Oct 6, 2022

Conversation

kdavisk6
Copy link
Member

@kdavisk6 kdavisk6 commented Oct 6, 2022

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

None yet

1 participant