Methods

Ethon::Easy::Http

This module contains logic about making valid HTTP requests.

Public Instance Methods

http_request(url, action_name, options = {}) click to toggle source

Set specified options in order to make a HTTP request. Look at {Ethon::Easy::Options Options} to see what you can provide in the options hash.

@example Set options for HTTP request.

easy.http_request("www.google.com", :get, {})

@param [ String ] url The url. @param [ String ] action_name The HTTP action name. @param [ Hash ] options The options hash.

@option options :params [ Hash ] Params hash which

is attached to the url.

@option options :body [ Hash ] Body hash which

becomes the request body. It is a PUT body for
PUT requests and a POST for everything else.

@option options :headers [ Hash ] Request headers.

@return [ void ]

@see Ethon::Easy::Options

# File lib/ethon/easy/http.rb, line 38
def http_request(url, action_name, options = {})
  fabricate(url, action_name, options).setup(self)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.