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

Do not overwrite default headers unless specified #518

Commits on Apr 12, 2017

  1. Do not overwrite default headers unless specified

    Previously, calling `HTTParty.headers` just to access them set
    `HTTParty.default_options[:headers]` to an empty hash. Now they will
    only be set to an empty hash when one is explicitly provided, otherwise
    they will remain `nil`.
    
    The previous behavior was problematic because the default headers
    for a request could either be `nil` or `{}`, depending on whether
    `HTTParty.headers` had been called. When they are `nil` the
    default headers from Net::HTTP are used.
    Chris Stadler committed Apr 12, 2017
    Configuration menu
    Copy the full SHA
    38125db View commit details
    Browse the repository at this point in the history