Review Board 1.7.16


ari:Add application/json parameter support

Review Request #2994 - Created Nov. 4, 2013 and submitted

David Lee
/team/dlee/ASTERISK-22685-json-body
ASTERISK-22685
Reviewers
asterisk-dev
pabelanger
Asterisk
The patch allows ARI to parse request parameters from an incoming JSON
request body, instead of requiring the request to come in as query
parameters (which is just weird for POST and DELETE) or form
parameters (which is okay, but a bit asymmetric given that all of our
responses are JSON).

For any operation that does _not_ have a parameter defined of type
body (i.e. "paramType": "body" in the API declaration), if a request
provides a request body with a Content type of "application/json", the
provided JSON document is parsed and searched for parameters.

The expected fields in the provided JSON document should match the
query parameters defined for the operation. If the parameter has
'allowMultiple' set, then the field in the JSON document may
optionally be an array of values.
Testsuite test.

See https://reviewboard.asterisk.org/r/2993/
Review request changed
Updated (Nov. 27, 2013, 10:22 a.m.)
  • changed from pending to submitted
Committed in revision 403190

https://reviewboard.asterisk.org/ runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to asteriskteam@digium.com.