Getting Started with the Net::HTTP - XL Routes Static

    Net::HTTP is Ruby’s native HTTP library.

    For any complex web service interactions we recommend rest-client, but for simple cases net/http will work well.

    require 'uri'
    require 'net/http'
    
    proxy = URI(ENV['xlroutesSTATIC_URL'])
    
    client = Net::HTTP.new('ip.jsontest.com', 80,
                           proxy.host, proxy.port,
                           proxy.user, proxy.password)
    
    response = client.get('/')
    
    p response.body
    

    We have examples for other common libraries as well, but if you can’t find what you are looking for just send us a Support ticket and we’ll get the right one sent to you.