Class: Ethon::Easy::Http::Post

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

Overview

This class knows everything about making POST requests.

Constant Summary

Constants included from Actionable

Actionable::QUERY_OPTIONS

Instance Method Summary collapse

Methods included from Postable

#set_form

Methods included from Actionable

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

Instance Method Details

#setup(easy) ⇒ Object

Setup easy to make a POST request.

Examples:

Setup.

post.setup(easy)

Parameters:

  • easy (Easy)

    The easy to setup.


16
17
18
19
20
21
22
# File 'lib/ethon/easy/http/post.rb', line 16

def setup(easy)
  super
  if form.empty?
    easy.postfieldsize = 0
    easy.copypostfields = ""
  end
end