Skip to content

Instantly share code, notes, and snippets.

@starkcoffee
Created October 6, 2011 17:14
Show Gist options
  • Save starkcoffee/1267990 to your computer and use it in GitHub Desktop.
Save starkcoffee/1267990 to your computer and use it in GitHub Desktop.
simple GET and access response with httparty
require 'rubygems'
require 'httparty'
require 'uri'
url = 'http://something.com'
options = { :http_proxyaddr =>'proxy.com' , :http_proxyport => 8080 }
response = HTTParty.get url ,options
puts url, response.code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment