I'm pretty new to this...
I have the following code:
request("http://somePythonServer.com?param1=1¶m2=2", function (err, response, body) {
if (err){
console.error(err);
next(err);
}
console.log("Response Ended - SUCCESS");
});
This request is made each time with different parameters and values and currently a new connection is being opened each time i run it.
My question is how to maintain an open connection?
EDIT: I have control on both sending and receiving end of the request.
MY GOAL: I'm trying to boost speed between two servers (NodeJS is sending HTTP GET to a python simple HTTP server) I want the connection between those two to remain open at all time in order for the requests to be as fast as possible.