Module: HTTP::Client
- Defined in:
- lib/http/client.rb
Defined Under Namespace
Classes: Error, Multipart, Request, Response
Constant Summary collapse
- VERSION =
'0.6.1'
- GET =
Net::HTTP::Get
- HEAD =
Net::HTTP::Head
- PUT =
Net::HTTP::Put
- POST =
Net::HTTP::Post
- DELETE =
Net::HTTP::Delete
- OPTIONS =
Net::HTTP::Options
- TRACE =
Net::HTTP::Trace
- SSL_VERIFY_NONE =
OpenSSL::SSL::VERIFY_NONE
- SSL_VERIFY_PEER =
OpenSSL::SSL::VERIFY_PEER
Class Attribute Summary collapse
-
.open_timeout ⇒ Object
Returns the value of attribute open_timeout.
-
.read_timeout ⇒ Object
Returns the value of attribute read_timeout.
-
.ssl_timeout ⇒ Object
Returns the value of attribute ssl_timeout.
Class Method Summary collapse
-
.delete(uri, args = {}) ⇒ HTTP::Client::Response
Creates a DELETE request and executes it, returning the response.
-
.get(uri, args = {}) ⇒ HTTP::Client::Response
Creates a GET request and executes it, returning the response.
-
.options(uri, args = {}) ⇒ HTTP::Client::Response
Creates a OPTIONS request and executes it, returning the response.
-
.post(uri, args = {}) ⇒ HTTP::Client::Response
Creates a POST request and executes it, returning the response.
-
.put(uri, args = {}) ⇒ HTTP::Client::Response
Creates a PUT request and executes it, returning the response.
-
.trace(uri, args = {}) ⇒ HTTP::Client::Response
Creates a TRACE request and executes it, returning the response.
Class Attribute Details
.open_timeout ⇒ Object
Returns the value of attribute open_timeout.
26 27 28 |
# File 'lib/http/client.rb', line 26 def open_timeout @open_timeout end |
.read_timeout ⇒ Object
Returns the value of attribute read_timeout.
26 27 28 |
# File 'lib/http/client.rb', line 26 def read_timeout @read_timeout end |
.ssl_timeout ⇒ Object
Returns the value of attribute ssl_timeout.
26 27 28 |
# File 'lib/http/client.rb', line 26 def ssl_timeout @ssl_timeout end |
Class Method Details
.delete(uri, args = {}) ⇒ HTTP::Client::Response
Creates a DELETE request and executes it, returning the response.
425 |
# File 'lib/http/client.rb', line 425 def delete uri, args = {}; Request.new(DELETE, uri, args).execute; end |
.get(uri, args = {}) ⇒ HTTP::Client::Response
Creates a GET request and executes it, returning the response.
398 |
# File 'lib/http/client.rb', line 398 def get uri, args = {}; Request.new(GET, uri, args).execute; end |
.options(uri, args = {}) ⇒ HTTP::Client::Response
Creates a OPTIONS request and executes it, returning the response.
434 |
# File 'lib/http/client.rb', line 434 def uri, args = {}; Request.new(OPTIONS, uri, args).execute; end |
.post(uri, args = {}) ⇒ HTTP::Client::Response
Creates a POST request and executes it, returning the response.
416 |
# File 'lib/http/client.rb', line 416 def post uri, args = {}; Request.new(POST, uri, args).execute; end |
.put(uri, args = {}) ⇒ HTTP::Client::Response
Creates a PUT request and executes it, returning the response.
407 |
# File 'lib/http/client.rb', line 407 def put uri, args = {}; Request.new(PUT, uri, args).execute; end |
.trace(uri, args = {}) ⇒ HTTP::Client::Response
Creates a TRACE request and executes it, returning the response.
443 |
# File 'lib/http/client.rb', line 443 def trace uri, args = {}; Request.new(TRACE, uri, args).execute; end |