Skip to content

Instantly share code, notes, and snippets.

@kapcod
Created October 16, 2017 20:09
Show Gist options
  • Save kapcod/68f8745b95b917050f3e6471318eb734 to your computer and use it in GitHub Desktop.
Save kapcod/68f8745b95b917050f3e6471318eb734 to your computer and use it in GitHub Desktop.
Hack to send request using Net::HTTP with preserved headers case
class CaseSensitiveHeadersPost < Net::HTTP::Post
def initialize_http_header(headers)
@header = {}
headers.each do |k,v|
@header[k] = [v]
end
end
def capitalize(name)
name
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment