Top "Net-http" questions

An HTTP client API for Ruby.

OpenSSL::SSL::SSLError: SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read server hello A

The code below yields the following error: OpenSSL::SSL::SSLError: SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read server hello …

ruby-on-rails ruby openssl net-http
Check Ruby HTTP response for success

How does one properly check the response from Net::HTTP::Get (for example) for "success" (i.e., a 2xx return …

ruby net-http
Ruby - net/http - following redirects

I've got a URL and I'm using HTTP GET to pass a query along to a page. What happens with …

ruby curl http-headers httpclient net-http
Sending a Post request with net/http

I need to send data in JSON to another app which runs on the same computer. I send request like …

ruby-on-rails ruby json post net-http
Ruby undefined method `bytesize' for #<Hash:0x2954fe8>

i have the following Ruby Code, for a tracking website in sandbox mode: require "net/http" require "net/https" require "…

ruby net-http
How to set a proxy in rubys net/http?

I'm trying to set a proxy and to use it in a simple get request like in the documentation. But …

ruby http proxy net-http
How to download an image file via HTTP into a temp file?

I've found good examples of NET::HTTP for downloading an image file, and I've found good examples of creating a …

ruby uri net-http
How to set a custom user agent in ruby

I've a task to test different user agents on a URL through automation. I'm using ruby to code, and I've …

ruby user-agent net-http
Ruby Open-URI library aborted in 404 HTTP error code

I use OpenURI library. object = open("http://example.com") If http://example.com server code response is equals to 200 my …

ruby open-uri net-http
Ruby using namespace/module

For example: require 'net/http' uri = URI('http://example.com/some_path?query=string') Net::HTTP.start(uri.host, uri.…

ruby class module namespaces net-http