Getting started with the httparty gem - QuotaGuard Static
HTTParty is a Ruby library for making HTTP requests and integrates easily with QuotaGuard Static:
require 'httparty'
proxy = URI(ENV["QUOTAGUARDSTATIC_URL"])
options = { http_proxyaddr: proxy.host,
http_proxyport: proxy.port,
http_proxyuser: proxy.user,
http_proxypass: proxy.password }
response = HTTParty.get('http://ip.jsontest.com/',options)
puts response.body, response.code, response.message, response.headers.inspect