-
Notifications
You must be signed in to change notification settings - Fork 74
Config headers to not be capitalized #143
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
Comments
I have been looking at how headers are capitalized for other reasons, and there is, fortunately, only one place where it is defined in I could imagine implementing this behavior by having some attribute in those classes which controls if |
Great, I will work on it! |
@yuki24 Sorry to tag you, do you think this change make sense? Can I do something to clarify or make it better? |
+1 on preserving headers, since its the default in other languages too and an attribute to control this with |
There is a PR open just waiting to review for this issue: #146 |
Context
I am consuming a API that have case sensitive header keys.
It is not common to see an case-sensitive header and also is off the specification. But sometimes it is off our control.
What I have in mind is some config to making possible to prevent the capitalize behavior and pass the header without changing it. Something like this:
The default behavior will remain the same, the idea is only change the behavior if this config are true.
Some workaround I can do is making a monkeypath to prevent the capitalization, but I thing it make sense to have this configuration.
I can try to implement it, but I want to know if make sense for Net::HTTP.
The text was updated successfully, but these errors were encountered: