Currently, I'm attempting to fetch some basic data from an API. Here is the URL for the request:
The issue lies in the fact that the server appears to keep refreshing the page constantly. This endless loading occurs both when using a browser and within my code setup, resulting in an incomplete load despite the JSON response visible on the browser. Additionally, after approximately one minute, another JSON response is tacked onto the original version in the browser.
Presently, I am utilizing this code snippet which never seems to terminate even after waiting for up to 5 minutes.
var response = UrlFetchApp.fetch("https://pool.rplant.xyz/api2/poolminer2x/raptoreum/RThRfoQJg8qsoStLk7QdThQGmpbFUCtvnk/UlRoUmZvUUpnOHFzb1N0TGs3UWRUaFFHbXBiRlVDdHZua3x4")
var json = JSON.parse(response.getContentText())
I am seeking guidance on how to halt this unending loop and extract the existing response data.
Edit:
In response to @JeremyThille's observation, the type of response received is text/event-stream
, yet I remain uncertain of the proper handling procedure for this type of response.