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

Header case modification makes restish unusable for some APIs with case senstive headers #230

Open
dbalmain opened this issue Dec 8, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@dbalmain
Copy link

dbalmain commented Dec 8, 2023

Firstly, I love this tool. I was about to build something similar myself, but this does almost everything I need.

I realise HTTP headers are supposed to be case-insensitive, but the reality is that a lot of APIs have case-sensitive headers, and for the APIs I'm using, they do not match the canonical format that go uses. e.g. One API I'm trying to use expects the header X-SourceSystem but go canonicalises this as X-Sourcesystem.

To fix this, you would need to replace the .Add and .Set methods in restish with adding the header directly so that the case isn't canonicalised? Also, the headers coming out of the profile in the config seem to be downcased before they even get added to the request. I haven't figured out where that happens yet.

@danielgtaylor danielgtaylor added the bug Something isn't working label Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants