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

Stringify headers #622

Merged
merged 4 commits into from
Nov 11, 2018
Merged

Stringify headers #622

merged 4 commits into from
Nov 11, 2018

Conversation

TheSmartnik
Copy link
Collaborator

FIxes #472

Copy link
Owner

@jnunemaker jnunemaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Any downside to this? I can't think of any off hand, other than if there is some special treatment of symbols buried deep in net/http somewhere.

context 'when headers passed as symbols' do
let(:headers) { { 'Content-Type' => 'application/json', 'Custom-Header' => 'example' } }

it 'convers them to string' do
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

convers => converts

@TheSmartnik
Copy link
Collaborator Author

Any downside to this?

@jnunemaker I don't think there is any. All of the other clients I've checked convert symbol headers to string without hesitation

@TheSmartnik TheSmartnik merged commit 2ac7256 into master Nov 11, 2018
@TheSmartnik TheSmartnik deleted the stringify_headers branch November 11, 2018 12:39
anthonyfranco pushed a commit to BetterCater/httparty that referenced this pull request Jun 25, 2020
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

Successfully merging this pull request may close these issues.

2 participants