-
-
Save nhmood/a387d1b05107db9fcf75 to your computer and use it in GitHub Desktop.
http_opts
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
############# | |
# Version 1 | |
############# | |
# Default HTTP option hash | |
HTTP_opts = { | |
:url => String.new, # URL Endpoint | |
:ssl => false, # SSL Enable (HTTPS) | |
:method => String.new, # GET/POST/PATCH | |
:auth => Hash.new, # Authentication credentials (Basic or Token) | |
:headers => Hash.new, # Array of additional headers | |
:data => Hash.new, # Hash of data for POST | |
:verbose => false # Verbose output from Net::HTTP | |
} | |
############# | |
# Version 2 | |
############# | |
# Default HTTP option hash | |
HTTP_opts = { | |
:url => "", # URL Endpoint | |
:ssl => false, # SSL Enable (HTTPS) | |
:method => "", # GET/POST/PATCH | |
:auth => {}, # Authentication credentials (Basic or Token) | |
:headers => {}, # Array of additional headers | |
:data => {}, # Hash of data for POST | |
:verbose => false # Verbose output from Net::HTTP | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment