Message through REST API - POST 204 No Content RRS feed

  • Question

  • I am trying to use IoT Hubs to do messaging through the HTTP/REST API. 

    Using the following POST request, the server returns a 204 No Content, when according to the docs, should return a 200. Using this method, I cannot GET the messages from the hub, but I can if I send the messages through Device Explorer > Messages to Device.

    POST /devices/<device>/messages/events?api-version=2016-02-03 HTTP/1.1
    HOST: aybcm.azure-devices.net
    Authorization: <SAS String>
    Content-Type: application/atom+xml;type=entry;charset=utb-8     //also tried application/json
    Content-Length: 35


    Using the GET method, I am able to get message round robin style that I post with Device Explorer > Messages to Device. 

    Is there something wrong with my POST request? Is ther a link I'm missing between device to cloud and cloud to device?


    Edit: It seems that after a device-to-cloud message is sent, it does not become available as a cloud-to-device message. How is this done?
    • Edited by ay8 Tuesday, July 19, 2016 8:53 PM
    Tuesday, July 19, 2016 6:05 PM