[asterisk-dev] [Code Review] 2986: ari: Add application/x-www-form-urlencoded parameter support
David Lee
reviewboard at asterisk.org
Fri Nov 1 16:21:07 CDT 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2986/
-----------------------------------------------------------
(Updated Nov. 1, 2013, 4:21 p.m.)
Review request for Asterisk Developers.
Changes
-------
Fix the error handling for processing the POST parameters from ARI.
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 (updated)
-----
/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 forthcoming.
Thanks,
David Lee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20131101/3913e7a1/attachment.html>
More information about the asterisk-dev
mailing list