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

Case sensitive headers #706

Open
radhakrishnanakireddy opened this issue Jul 23, 2020 · 3 comments
Open

Case sensitive headers #706

radhakrishnanakireddy opened this issue Jul 23, 2020 · 3 comments

Comments

@radhakrishnanakireddy
Copy link

Hi,
I am getting Case sensitive headers with ruby 2.6.5,
Can anyone please help me with it

Thank you,

@TheSmartnik
Copy link
Collaborator

Hi!
Could you be more specifc, plase?
What you trying to achive? What are you getting instead?

@radhakrishnanakireddy
Copy link
Author

Hi Please find the sample code

HTTParty.get(uri,
:headers => {
"Content-Type"=>"application/json",
"Accept"=>"application/json",
"sso_token" => "xxxxxxxxxxx"
}
end

When I tried the same request with curl or swagger its working, but it not working in HTTParty and as per my analysis there is something wrong with customize headers (https://stackoverflow.com/questions/42815249/how-to-preserve-custom-headers-case-in-ruby). It is happening in ruby 2.6.5,

Can anyone please help me regarding this.

Thank you

@merchang
Copy link

merchang commented Nov 3, 2022

this is a duplicate of #406 and not necessarily an issue with HTTParty

HTTParty uses NET::HTTP, which capitalizes request headers by default

the cleanest work around i've found #406 (comment)

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

3 participants