com.fasterxml.jackson.core.JsonParseException

 

Hi All,

We are trying to send notification through curl command(message to all devices example code),we are getting below issue.

 

C:\Users\srinivas>curl https://go.urbanairship.com/api/push  -X POST  -u "xtojwNzNRsChB_prw5Jb2Q:N5yYHYZZQQ6AALbuqE02xg" -H "Accept: application/vnd.urbanairship+json; version=3" -H "Content-Type: application/json" -d '{"audience": "all","notification":{"alert" : "Hey Android and iOS!!"}, "device_types": ["android"]}'{"ok":false,"error":"Could not parse request body.","error_code":40000,"details":{"error":"com.fasterxml.jackson.core.JsonParseException: Unexpected character (''' (code 39)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')\n at [Source: '{audience:; line: 1, column: 2]","location":{"line":1,"column":2}},"operation_id":"96ce3fb1-a1f9-4632-8806-f9d0b018f541"}curl:(3) [globbing] unmatched brace in column 18curl: (7) Failed to connect to  port 80: Connection refusedcurl: (3) [globbing] unmatched close brace/bracket in column 22curl: (6) Could not resolve host: device_typescurl: (3) [globbing] bad range in column 6

 

Didn't find what you were looking for?

New post

Comments

1 comment

  • Hi Chnakaya,

    This is Sean with Urban Airship Technical Support.

    Our examples are for use with curl in the Mac OS X terminal. If you want to quickly and easily create requests on Windows, I would check out the Postman Chrome extension.

    Please let me know if you have any other questions or concerns.

     

    Sean
    Urban Airship Technical Support

    0

Please sign in to leave a comment.