HTTP Header names are case insensitive, but Hackney returns a proplist of headers and the obvious way to extract a value proplists:get_value is case sensitive.
I would suggest either normalizing the case of the proplist keys before returning them, or return a hackney_headers data structure, which would encourage users to call hackney_headers:get_value(CaseInsensitiveKey, Headers, Default).
Doing this will ensure user code doesn't break if/when an HTTP intermediary changes the case of response headers (ala Amazon ELBs, Heroku's HTTP router, etc).
HTTP Header names are case insensitive, but Hackney returns a proplist of headers and the obvious way to extract a value
proplists:get_valueis case sensitive.I would suggest either normalizing the case of the proplist keys before returning them, or return a
hackney_headersdata structure, which would encourage users to callhackney_headers:get_value(CaseInsensitiveKey, Headers, Default).Doing this will ensure user code doesn't break if/when an HTTP intermediary changes the case of response headers (ala Amazon ELBs, Heroku's HTTP router, etc).