LIFX Developer Zone

HTTP API suddenly case sensitive for true/false?


#1

Hi! I’ve been using the pifx Python library as the backend of a chatbot. It was working fine, and then recently it stopped being able to breathe or pulse the lights, instead receiving a “422: Missing or malformed parameters” error. It turns out it’s because the boolean parameters became case-sensitive and now require lowercase “true” and “false”, so Python’s True and False values stopped working. I plan to alert the pifx maintainer, but was that an intentional change?


HTTP API scene duration broken?
#2

Hey mclark,

Thanks for pointing this out, this was a bug introduced into the URL & POST parsing, which should be fixed now.

Note however, we do not accept invalid JSON from clients sending requests as JSON: if your library is sending JSON bools as anything other than true and false this is invalid JSON and we make no guarantee to maintain support for undocumented features.

Nick