Class: Resourceful::UrlencodedFormData

Inherits:
AbstractFormData show all
Defined in:
lib/resourceful/urlencoded_form_data.rb

Instance Method Summary collapse

Methods inherited from AbstractFormData

#add, #initialize, #rewind

Constructor Details

This class inherits a constructor from Resourceful::AbstractFormData

Instance Method Details

#content_typeObject



7
8
9
# File 'lib/resourceful/urlencoded_form_data.rb', line 7

def content_type
  "application/x-www-form-urlencoded"
end

#readObject

Read the form data encoded for putting on the wire.



12
13
14
15
16
# File 'lib/resourceful/urlencoded_form_data.rb', line 12

def read
  @form_data.map do |k,v|
    CGI.escape(k) + '=' + CGI.escape(v)
  end.join('&')
end