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

David M. Lee (JIRA) noreply at issues.asterisk.org
Mon Oct 14 09:37:03 CDT 2013


    [ https://issues.asterisk.org/jira/browse/ASTERISK-22685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=210896#comment-210896 ] 

David M. Lee commented on ASTERISK-22685:
-----------------------------------------

For the initial version of the API, only query and path parameters are supported. Yes, I feel a bit gross POSTing with query parameters, but that's where we are today.

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

So I would call this a 'feature request' instead of a 'bug'.
                
> 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