How to make status_Url to use with homebridge http switch

Hi everyone,

New here, so don’t know the correct location for this question, but this was my best guess.

If have made a simple http switch with a NodeMcu and everything works fine.

I can open and close the switch with an on_url and off_url. I have also linked this switch with Homebridge and can controll it via the Apple Homekit app. I use the “homebridge-http-switch” plugin.

In this plugin you can also add a status_url that queries the current status of my switch by the means of 1 (on) and 0 (off).

My question is now, how can I make such an url in Arduino IDE that sends a 1 when my switch is onand 0 when my switch is off.