Skip to content

Instantly share code, notes, and snippets.

@soopercorp
Created August 13, 2012 16:10
Show Gist options
  • Save soopercorp/3342235 to your computer and use it in GitHub Desktop.
Save soopercorp/3342235 to your computer and use it in GitHub Desktop.
make https call in ruby
url = URI.parse('https://api.xyz.com/v1/method?auth_token=adjfsdjfsdflsd')
req = Net::HTTP::Get.new(url.path)
response = Net::HTTP.start(url.host, use_ssl: true) do |http|
http.get url.request_uri
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment