How do I send a Boolean with WebCore web request?

I’m trying to send a web request (PUT) to an api with a body of {‘on’: False} from webcore.

I’m not getting any errors, but my endpoint isn’t showing me the result I am expecting. I am able to send the same request via an apple shortcut so I know it works. Can someone show me an example on how I would write this web request in webcore?

Can you show us the webcore code that you are using?

Boolean values are lower case...

1 Like

Really? Please elaborate a bit further please.

Sorry for the delay. Here is what I am working with I removed the ip and token.

Bump

Screenshot 2024-03-09 at 05-58-01 How do I send a Boolean with WebCore web request - ⚙️ Custom Apps and Drivers _ webCore - Hubitat

in JSON, booleans should NOT have quotes. Also, JSON requires double quotes, not single quotes. Try with this please:

{
   "on": false
}

or in its condensed form:

{"on":false}

I had to use the \ with each of my { and } with my JSON strings...

Thanks everyone. I'll give this a try

Did you find a solution?