lostisland/faraday — pull request #306 by claudiob (2013-10-05 04:15:54+00:00)
Title: Make Headers#fetch case-insensitive, like []

Faraday::Utils::Headers extend the behavior of Ruby's Hash by
making the [] operator working without being case sensitive.

This commit provides the same behavior for the .fetch operator.

For instance, given `@headers['Content-Type'] = 'application/json'`,
it is now possible obtain the content type in all of these cases:

@headers['Content-Type']
@headers.fetch 'Content-Type'
@headers['content-type']
@headers.fetch 'content-type'

The tests in the commit ensure that all the cases of Ruby's Hash
work as expected