Short Polling and Long Polling

I built a remote control application using a Xojo web app, which sends commands to a Raspberry Pi, so that it can be used to turn lights on/off remotely.

I am currently using short polling, implemented with the HandleURL event. The Raspberry Pi app makes a GET request every 10 seconds to check if there is a new command from the web app.

Is it possible to implement long polling with the HandleURL event?