restish
restish copied to clipboard
Ability to set custom additional headers to send to token URL with client_credentials
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?