Hello
I am trying to make LIVE api json but no idea how I should do. I am making a desktop application and the app is asking for the JSON via api.php
So the application will authenticate with api token and then getting the json data.
Normally it works fine for me but somehow I need to trigger the JSON data to change whenever I change a value or entire JSON data from different page to have LIVE json data.
I did think about websockets but it would be expensive over time and budget doesn't allow me to do so. I did thinking to use livewire instead.
Is it possible to do so or I must to use websocket?
Thank you in advance the answers.
@beginnersoul I think you need understand how HTTP requests work. You make a request, you get a response. That’s it. A response doesn’t automatically or “live” update. If you want fresh results, you issue a new HTTP request.
So, if you don’t want to use web sockets then you’re going to have to instead constantly poll your API for whatever data you want, which isn’t live. But if you do want live updates, then you are gonna need to use web sockets.