Wednesday 19 April 2017

Synchronous HTTP call

I have this API that I am using that is doHttp.get(someUrl) and it returns the response, and depending on the response, I can do stuff with it.I am able to run this in the browser via an XMLHttpRequest and set the async flag to false.In Nashorn I am able to run this synchronously without any problems out of the box.I am working on a Node implementation, and I cannot figure out how to do this synchronously. I have found a library, sync-request but there are known security vulnerabilities according to the GitHub page.Is there a way to do this synchronously in Node?

Submitted April 19, 2017 at 05:43PM by SpoilerAlertsAhead

No comments:

Post a Comment