Module: Ethon::Easies::Http

Included in:
Ethon::Easy
Defined in:
lib/ethon/easies/http.rb,
lib/ethon/easies/http/get.rb,
lib/ethon/easies/http/put.rb,
lib/ethon/easies/http/head.rb,
lib/ethon/easies/http/post.rb,
lib/ethon/easies/http/patch.rb,
lib/ethon/easies/http/delete.rb,
lib/ethon/easies/http/options.rb,
lib/ethon/easies/http/putable.rb,
lib/ethon/easies/http/postable.rb,
lib/ethon/easies/http/actionable.rb

Overview

This module contains logic about making valid http requests.

Defined Under Namespace

Modules: Actionable, Postable, Putable Classes: Delete, Get, Head, Options, Patch, Post, Put

Instance Method Summary collapse

Instance Method Details

#http_request(url, action_name, options = {}) ⇒ Object

Set specified options in order to make a http request.

Examples:

Set options for http request.

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

Parameters:

  • url (String)

    The url.

  • action_name (String)

    The http action name.

  • options (Hash) (defaults to: {})

    The options hash.



24
25
26
# File 'lib/ethon/easies/http.rb', line 24

def http_request(url, action_name, options = {})
  fabricate(action_name).new(url, options).setup(self)
end