Net::HTTP is Ruby's native HTTP library. For any complex web service interactions we recommend rest-client but for simple cases net/http is ok.


  

require 'uri'
require 'net/http'

proxy = URI(ENV["STATICA_URL"])
h = Net::HTTP.new('ip.jsontest.com', 80,proxy.host, proxy.port, proxy.user, proxy.password)
response = h.get("/")
p response.body