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

Allow users to add custom headers #401

Merged

Conversation

EandrewJones
Copy link
Contributor

Closes #400

Changes

Follows identical pattern to #398 to allow users to statically add additional headers to the POST request or dynamically generate new headers on every request.

Things to consider

Given how this behavior is a superset of the feature introduced #398, we could refactor and merge the two. But this would be a breaking change since it would mean deprecating the config.auth field in favor of a more generic config.headers field.

My preference is to keep both and leave them separate. Users could opt to use the headers callback to cover the Auth case as well, which may be preferred if they need to define the auth headers + some others. For users that only need to add auth headers, they could use the functionality added in #398.

Copy link
Contributor

@Jyyjy Jyyjy left a comment

Choose a reason for hiding this comment

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

LGTM

@Jyyjy Jyyjy merged commit ccdb459 into apache:test Jan 29, 2024
2 checks passed
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.

2 participants