Class: RestClient::Payload::UrlEncoded

Inherits:
Base
  • Object
show all
Defined in:
lib/restclient/payload.rb

Instance Method Summary collapse

Methods inherited from Base

#close, #closed?, #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



131
132
133
134
# File 'lib/restclient/payload.rb', line 131

def build_stream(params = nil)
  @stream = StringIO.new(Utils.encode_query_string(params))
  @stream.seek(0)
end

#headersObject



136
137
138
# File 'lib/restclient/payload.rb', line 136

def headers
  super.merge({'Content-Type' => 'application/x-www-form-urlencoded'})
end