Created
October 16, 2017 20:09
-
-
Save kapcod/68f8745b95b917050f3e6471318eb734 to your computer and use it in GitHub Desktop.
Hack to send request using Net::HTTP with preserved headers case
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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