Class: Axn::Webhooks::Request::ParamsResult
- Inherits:
-
Data
- Object
- Data
- Axn::Webhooks::Request::ParamsResult
- Defined in:
- lib/axn/webhooks/request.rb
Overview
params reflects the request's PRIMARY param source — never a query+form merge, because
url (below) already carries the query string. Merging both would double-count query
params for URL-signing verifiers (e.g. Twilio's RequestValidator does
validate(req.url, req.params, signature), which HMACs the query string once via the url
and would HMAC it a second time via params if it were also merged in).
- form-urlencoded body on a request that carries one (Twilio's SMS/voice POST) -> params =
form fields only; the query (if any) is still reachable via
url. - multipart/form-data body -> same, parsed by Rack (Dropbox Sign posts the whole event as a
single
jsonfield, and its verifier reads that field twice: Content-MD5 over it, then JSON.parse of it). - everything else (GET/HEAD query, JSON POST, etc.) -> params = query string (e.g. the
Nylas/Meta GET challenge, read via
req.params["challenge"]). GET/HEAD never carry a body, so even a form-urlencoded default Content-Type header on a GET (common on challenge requests) must not shadow the query string with an empty-body parse. Parsed params plus whatever failure produced them, so the caller decides when the failure matters.valueis always a Hash.
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error
142 143 144 |
# File 'lib/axn/webhooks/request.rb', line 142 def error @error end |
#value ⇒ Object (readonly)
Returns the value of attribute value
142 143 144 |
# File 'lib/axn/webhooks/request.rb', line 142 def value @value end |