Yea, there were many solutions to this rare but not uncommon question. You could have used super-easy-to-use Bridge code and Adobe Bridge running to perform a nice synchronous web call all within extendscript. But, then one year Bridge 2016 had a bug in its scripting to where this feature quit working. And it quit for one of my customers so they were in a bind as that's how they were performing their web calls to produce their wares daily, otherwise they would have to go copy stuff from the browser for hours. So, they were able to quickly work around this by reverting back to the previous Bridge until Adobe ended up fixing the bug. Which lasted about a good 2 years and then the same thing happens. Or something is changed and this basically doesn't work for web calls anymore.
So, I just changed over to using OS scripts such as AppleScript or VBS for Windows to send web calls and also pass those results to the JSX scripts. Some of us have used a method of executing an os script from a jsx script and waiting with .sleep() intervals for a certain duration while monitoring some location where the results of the web call would be written down in a text file. I write my jsx scripts as functions which can be runnable from external os scripts so that this process is chained, but that process still uses a text file to write down the url and also if there was a UI dialog in Illustrator, it disappears and then comes back populated with web-call results but this lets the user move their mouse around and do stuff in the document for a few moments.
So, yea there's ways to do web calls but it's not out-of-the-box.