[asterisk-bugs] [JIRA] (ASTERISK-22685) Unable to POST content-type: application/json to ARI

Paul Belanger (JIRA) noreply at issues.asterisk.org
Sun Oct 13 19:23:03 CDT 2013


Paul Belanger created ASTERISK-22685:
----------------------------------------

             Summary: Unable to POST content-type: application/json to ARI
                 Key: ASTERISK-22685
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-22685
             Project: Asterisk
          Issue Type: Bug
      Security Level: None
          Components: Resources/res_ari
    Affects Versions: 12.0.0-beta1
            Reporter: Paul Belanger


After some initial testing, it looks like support for POSTing content as json to ARI is not supported.

{code}
$ curl -i -X POST -H 'Content-Type: application/json' -H 'Authorization: Basic x1x2x3' -H 'Accept: application/json' -H 'User-Agent: python-ari' -d '{"endpoint": "local/1"}' http://localhost:8088/ari/channels 

HTTP/1.1 400 Bad Request
content-length: 45
server: Asterisk/SVN-trunk-r396505M
connection: close
cache-control: no-cache, no-store
date: Sun, 13 Oct 2013 23:03:14 GMT
content-type: application/json
 
{
  "message": "Endpoint must be specified"
}
{code}

>From a library point of view, it would be great to keep the data formatted constantly throughout vs converting it for different HTTP actions.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list