Module: Ethon::Easy::Http::Putable
- Included in:
- Put
- Defined in:
- lib/ethon/easy/http/putable.rb
Overview
This module contains logic about setting up a PUT body.
Instance Method Summary collapse
-
#set_form(easy) ⇒ Object
Set things up when form is provided.
Instance Method Details
#set_form(easy) ⇒ Object
Set things up when form is provided. Deals with multipart forms.
15 16 17 18 19 20 21 |
# File 'lib/ethon/easy/http/putable.rb', line 15 def set_form(easy) easy.upload = true form.escape = true form.params_encoding = params_encoding easy.infilesize = form.to_s.bytesize easy.set_read_callback(form.to_s) end |