Class: HTTPX::Transcoder::Form::Encoder
- Inherits:
-
Object
- Object
- HTTPX::Transcoder::Form::Encoder
- Extended by:
- Forwardable
- Defined in:
- lib/httpx/transcoder/form.rb
Instance Method Summary collapse
- #content_type ⇒ Object
-
#initialize(form) ⇒ Encoder
constructor
A new instance of Encoder.
- #to_str ⇒ Object
Constructor Details
#initialize(form) ⇒ Encoder
Returns a new instance of Encoder.
19 20 21 |
# File 'lib/httpx/transcoder/form.rb', line 19 def initialize(form) @raw = URI.encode_www_form(form) end |
Instance Method Details
#content_type ⇒ Object
23 24 25 |
# File 'lib/httpx/transcoder/form.rb', line 23 def content_type "application/x-www-form-urlencoded" end |
#to_str ⇒ Object
27 28 29 |
# File 'lib/httpx/transcoder/form.rb', line 27 def to_str @raw.to_s end |