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

David Lee reviewboard at asterisk.org
Fri Nov 8 11:28:42 CST 2013


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

(Updated Nov. 8, 2013, 11:28 a.m.)


Status
------

This change has been marked as submitted.


Review request for Asterisk Developers.


Changes
-------

Committed in revision 402555


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 
  /branches/12/main/manager.c 402368 
  /branches/12/main/http.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: https://reviewboard.asterisk.org/r/2993/


Thanks,

David Lee

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


More information about the asterisk-dev mailing list