Class: RestClient::Payload::UrlEncoded
- Defined in:
- lib/restclient/payload.rb
Instance Method Summary collapse
Methods inherited from Base
#close, #initialize, #read, #short_inspect, #size, #to_s, #to_s_inspect
Constructor Details
This class inherits a constructor from RestClient::Payload::Base
Instance Method Details
#build_stream(params = nil) ⇒ Object
106 107 108 109 |
# File 'lib/restclient/payload.rb', line 106 def build_stream(params = nil) @stream = StringIO.new(Utils.encode_query_string(params)) @stream.seek(0) end |
#headers ⇒ Object
111 112 113 |
# File 'lib/restclient/payload.rb', line 111 def headers super.merge({'Content-Type' => 'application/x-www-form-urlencoded'}) end |