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

Ability to set custom additional headers to send to token URL with client_credentials #265

Open
benweint opened this issue Sep 26, 2024 · 0 comments

Comments

@benweint
Copy link

Hello! Restish seems like a really useful tool - thank you for creating and documenting it!

I'm setting it up for the first time, with an API that uses client credentials for auth. It almost works, except that the API I'm calling imposes an (apparently non-standard) requirement that callers specify the Accept: application/json header (Accept: */* also appears to work) when hitting the token URL.

Based on the HTTP tracing emitted by setting GODEBUG=http2debug=2 when invoking restish, it looks like it's not sending along any Accept header at all, which causes the token request to fail.

Is there a way to specify additional headers to be sent along with the request to the token URL? If not, would you be open to adding one, or sending along a static value for the Accept header?

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

No branches or pull requests

1 participant