Class: RestBuilder::Payload::UrlEncoded

Inherits:
StreamedString show all
Defined in:
lib/rest-builder/payload.rb

Instance Attribute Summary

Attributes inherited from RestBuilder::Payload

#io

Instance Method Summary collapse

Methods inherited from RestBuilder::Payload

#close, #closed?, generate, generate_with_headers, #read, #size

Constructor Details

#initialize(payload) ⇒ UrlEncoded

Returns a new instance of UrlEncoded.



84
85
86
# File 'lib/rest-builder/payload.rb', line 84

def initialize payload
  super(Middleware.percent_encode(payload))
end

Instance Method Details

#headersObject



88
89
90
# File 'lib/rest-builder/payload.rb', line 88

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