Get JSON or XML result from HTTP call (so I can check Hue bulb light state)

67 views
Skip to first unread message

Darrell Marjoram

unread,
Jan 22, 2016, 4:53:25 PM1/22/16
to Wireless Sensor Tags
Hi,

I've love to see the ability to get a result from a HTTP call, even just the body string. This will allow me to check, for example, Philips Hue bulb state when a PIR is triggered and then when it times out, return the bulb to its original state.

Currently, my bulbs turn off even though I don't want them to if  they are already on.

Any suggestions to get this behaviour with the current API?

Kind Regards,
Darrell

Darrell Marjoram

unread,
Jan 23, 2016, 10:51:28 AM1/23/16
to Wireless Sensor Tags
To save on server resources in your Rackspace environment, you could even call dispose of the HTTP response when calling GetResponse() on the HttpWebRequest when the response body exceeds a small size, e.g. 1KB. This will be more than enough for 99% of usecases and will provide protection to your web service and a great feature (which is really required).
Reply all
Reply to author
Forward
0 new messages