[asterisk-dev] [Code Review] 2986: ari: Add application/x-www-form-urlencoded parameter support

David Lee reviewboard at asterisk.org
Fri Nov 1 13:05:10 CDT 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2986/
-----------------------------------------------------------

Review request for Asterisk Developers.


Bugs: ASTERISK-22743
    https://issues.asterisk.org/jira/browse/ASTERISK-22743


Repository: Asterisk


Description
-------

ARI POST calls only accept parameters via the URL's query string.
While this works, it's atypical for HTTP API's in general, and
specifically frowned upon with RESTful API's.

This patch adds parsing for application/x-www-form-urlencoded request
bodies if they are sent in with the request. Any variables parsed this
way are prepended to the variable list supplied by the query string.


Diffs
-----

  /branches/12/res/res_ari.c 402368 

Diff: https://reviewboard.asterisk.org/r/2986/diff/


Testing
-------

curl -vs --data "channel=1383326738.0&api_key=ari:ari" http://localhost:8088/ari/bridges/e78019f3-9710-43c7-8421-de5cff48e3d3/addChannel

Testsuite test forthcoming.


Thanks,

David Lee

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20131101/7bbe5fe5/attachment.html>


More information about the asterisk-dev mailing list