I am trying to send a list of proxy addresses to requestjs & want it to use first one that's is working. Is it at all possible via request.js
My code is
var body = '<sample/>';
request.post({
url: www.google.com,
proxy':'http://proxy1:8087;http://proxy2:8080',//need to use multiple proxies here.
headers: { //We can define headers too
'Content-Type': 'text/xml'
},
body: body,
timeout:20000
}
I am thinking of looping through list of proxies and try to use them one by one. I am not sure if that would have been an overkill or is the only way possible.