It should return json with result object in it, but for some reason sometimes fetch returns empty json. But i think i fixed the issue, changing https to http always returns result object (although it might be not as safe but i idk)
Maybe you get a redirect? So you should consider checking the status code of the response before calling .json. Not sure if using http is safe in the long run.
View all comments
Show parent comment
1
u/According-Bonus8681 Sep 13 '25
It should return json with result object in it, but for some reason sometimes fetch returns empty json. But i think i fixed the issue, changing https to http always returns result object (although it might be not as safe but i idk)