Wednesday, 22 April 2020

Does a server stop after sending a response to the client?

I’m new to nodejs. I have a function that makes a lot of requests to a website, and I want to send a response to the client after, let’s say, 15 requests.Does my server stop making requests after the response is sent?The code would look like this, and the “callThis” function is called in a forEach loop:function callThis() { if(num_requests == 15) { response.json(something) } request.get(...) }

Submitted April 22, 2020 at 08:50AM by wavedrop_

No comments:

Post a Comment