Class: RestCore::Payload::UrlEncoded
- Inherits:
-
StreamedString
- Object
- RestCore::Payload
- Streamed
- StreamedString
- RestCore::Payload::UrlEncoded
- Defined in:
- lib/rest-core/util/payload.rb
Constant Summary
Constants included from RestCore
ASYNC, CLIENT, DRY, FAIL, HIJACK, LOG, RestCore::PROMISE, REQUEST_HEADERS, REQUEST_METHOD, REQUEST_PATH, REQUEST_PAYLOAD, REQUEST_QUERY, REQUEST_URI, RESPONSE_BODY, RESPONSE_HEADERS, RESPONSE_KEY, RESPONSE_SOCKET, RESPONSE_STATUS, Simple, TIMER, Universal, VERSION
Instance Attribute Summary
Attributes inherited from RestCore::Payload
Instance Method Summary collapse
- #headers ⇒ Object
-
#initialize(payload) ⇒ UrlEncoded
constructor
A new instance of UrlEncoded.
Methods inherited from RestCore::Payload
#close, #closed?, generate, generate_with_headers, #read, #size
Methods included from RestCore
Constructor Details
#initialize(payload) ⇒ UrlEncoded
Returns a new instance of UrlEncoded.
81 82 83 |
# File 'lib/rest-core/util/payload.rb', line 81 def initialize payload super(RestCore::Middleware.percent_encode(payload)) end |
Instance Method Details
#headers ⇒ Object
85 86 87 |
# File 'lib/rest-core/util/payload.rb', line 85 def headers super.merge('Content-Type' => 'application/x-www-form-urlencoded') end |