I am trying to fetch from API server using Net::HTTP
.
puts "#{uri}".green
response = Net::HTTP.new('glassdoor.com').start { |http|
# always proxy via your.proxy.addr:8080
response = http.get(uri, {'Accept' => 'application/json'})
puts "Res val: #{response.body}".blue
}
I got the uri
from the console and pasted in the browser, and I received the JSON response.
But using the Ruby Net::HTTP
get I receive some security message:
Why the difference? The browser and the Ruby script are behind the same public IP.