Class: Ethon::Easy::Http::Custom

Inherits:
Object
  • Object
show all
Includes:
Actionable, Postable
Defined in:
lib/ethon/easy/http/custom.rb

Overview

This class knows everything about making requests for custom HTTP verbs.

Constant Summary

Constants included from Actionable

Actionable::QUERY_OPTIONS

Instance Method Summary collapse

Methods included from Postable

#set_form

Methods included from Actionable

#form, #options, #params, #params_encoding, #query_options, #set_form, #set_params, #url

Constructor Details

#initialize(verb, url, options) ⇒ Custom

Returns a new instance of Custom.


10
11
12
13
# File 'lib/ethon/easy/http/custom.rb', line 10

def initialize(verb, url, options)
  @verb = verb
  super(url, options)
end

Instance Method Details

#setup(easy) ⇒ Object

Setup easy to make a request.

Examples:

Setup.

custom.set_params(easy)

Parameters:

  • easy (Easy)

    The easy to setup.


21
22
23
24
# File 'lib/ethon/easy/http/custom.rb', line 21

def setup(easy)
  super
  easy.customrequest = @verb
end