Top "Net-http" questions

An HTTP client API for Ruby.

How do I skip an iteration if an IF condition becomes true, and go to the first line of do .. end?

I wrote the following code: require 'net/http' require 'uri' require 'IPAddr' require 'timeout' require 'Resolv' require 'open-uri' #puts "Origin …

ruby label goto net-http
Posting Ruby data in JSON format with Net/http

I have this ruby file: require 'net/http' require 'json' require 'uri' #test data newAcctJson ='{ "type": "Credit Card", "nickname": "…

ruby json net-http
how to set header['content-type']='application/json' in ruby

require 'net/http' require 'rubygems' require 'json' url = URI.parse('http://www.xyxx/abc/pqr') resp = Net::HTTP.get_response(…

ruby rest net-http
Why do I get "Errno::ECONNREFUSED" with 'net/http' in Rails?

I am trying to parse an XML file from a URL. When I try something like this: require 'net/http' …

ruby-on-rails ruby net-http
Ruby 1.8.7 and Net::HTTP: Making an SSL GET request with client cert?

I'm trying to fetch a resource via SSL using Net::HTTP. Here is the relevant code fragment: req = Net::HTTP::…

ruby ssl certificate client-certificates net-http
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed ONLY WHEN PROXYING

This post nearly duplicates a number of other posts, including Rails 4 and Ruby 2 Net/HTTP SSL Request: OpenSSL::SSL::SSLError: …

ruby ssl openssl net-http charles-proxy
Ruby Net::HTTP execution expired

Using Net::HTTP, I periodically find that the code below rescues from StandardError with a message of "execution expired", despite …

ruby net-http
Measure response time for a HTTP request using Ruby

I'm building a small website for personal use to test an API my company makes. My boss wants a website …

ruby net-http
Ruby Proxy Authentication GET/POST with OpenURI or net/http

I'm using ruby 1.9.3 and trying to use open-uri to get a url and try posting using Net:HTTP Im trying …

ruby-on-rails ruby proxy open-uri net-http
HTTPS request using Net::HTTP's block form -- is it possible?

To do a Net::HTTP https request without the block form you can do this: ... http = Net::HTTP.new(url.…

ruby ssl https net-http