module HTTP::Client

Constants

DELETE
GET
OPTIONS
POST
PUT
SSL_VERIFY_NONE
SSL_VERIFY_PEER
TRACE
VERSION

Attributes

open_timeout[RW]
read_timeout[RW]
ssl_timeout[RW]

Public Class Methods

delete(uri, args = {}) click to toggle source

Creates a DELETE request and executes it, returning the response. @see HTTP::Client::Request#initialize

@param [String or URI] uri Remote URI. @param [Hash] args Options, see HTTP::Client::Request#initialize. @return [HTTP::Client::Response]

# File lib/http/client.rb, line 425
def delete uri, args = {}; Request.new(DELETE, uri, args).execute; end
get(uri, args = {}) click to toggle source

Creates a GET request and executes it, returning the response. @see HTTP::Client::Request#initialize

@param [String or URI] uri Remote URI. @param [Hash] args Options, see HTTP::Client::Request#initialize. @return [HTTP::Client::Response]

# File lib/http/client.rb, line 398
def get uri, args = {}; Request.new(GET, uri, args).execute; end
options(uri, args = {}) click to toggle source

Creates a OPTIONS request and executes it, returning the response. @see HTTP::Client::Request#initialize

@param [String or URI] uri Remote URI. @param [Hash] args Options, see HTTP::Client::Request#initialize. @return [HTTP::Client::Response]

# File lib/http/client.rb, line 434
def options uri, args = {}; Request.new(OPTIONS, uri, args).execute; end
post(uri, args = {}) click to toggle source

Creates a POST request and executes it, returning the response. @see HTTP::Client::Request#initialize

@param [String or URI] uri Remote URI. @param [Hash] args Options, see HTTP::Client::Request#initialize. @return [HTTP::Client::Response]

# File lib/http/client.rb, line 416
def post  uri, args = {}; Request.new(POST, uri, args).execute; end
put(uri, args = {}) click to toggle source

Creates a PUT request and executes it, returning the response. @see HTTP::Client::Request#initialize

@param [String or URI] uri Remote URI. @param [Hash] args Options, see HTTP::Client::Request#initialize. @return [HTTP::Client::Response]

# File lib/http/client.rb, line 407
def put uri, args = {}; Request.new(PUT, uri, args).execute; end
trace(uri, args = {}) click to toggle source

Creates a TRACE request and executes it, returning the response. @see HTTP::Client::Request#initialize

@param [String or URI] uri Remote URI. @param [Hash] args Options, see HTTP::Client::Request#initialize. @return [HTTP::Client::Response]

# File lib/http/client.rb, line 443
def trace uri, args = {}; Request.new(TRACE, uri, args).execute; end