How to get HTTP status codes from webhooks on the device

I’ve successfully set up my web hooks on the Device Cloud and I am able so publish and subscribe to these hooks accordingly. However, I would like to get the HTTP status code response from the web hooks on my device. Here is the HTTP response received from the web hook URL:

Response
The HTTP response received from the webhook url
HTTP/1.1 200 OK
Content-Length: 15
Date: Fri, 25 Jan 2019 14:16:22 GMT
Server: Hunchentoot 1.2.35
Content-Type: text/html; charset=utf-8

"Session started"

What I am interested in is the “200 OK” response. My handler only gives me back the returned data which is ““Session started””.

My reason for doing so is I want to do something like this:

  • Sent a HTTP request to start a user session
  • Get the HTTP response code
  • If sever response is good (i.e 200 OK), proceed to send some session data, else request for session again

I know I am able to parse the “Session started” message, however I would still like the HTTP response code in the event the sever’s message changes.

I went through both the particle documents, examples as well as the intermediate web hook tutorial on the forums and I am not able to figure this out. =(