Closed mnlbox closed 7 years ago
Yes, this is possible. You can use the requestOptions
option, like this:
ProxyVerifier.test(proxy, {
requestOptions: {
// request options go here.
},
testUrl: 'https://www.google.com/?q=test',
testFn: function(data, status, headers) {
// Check the response data, status, and headers.
// Throw an error if the test failed.
throw new Error('Test failed!');
// Do nothing if the test passed.
}
}, function(error, results) {
// Do something with error or results.
});
This isn't documented yet, but it should be stable enough to use going forward.
Is it possible to set request options in Test function like
testAll
and other functions? I can't see related note in docs. I want to increase request connection timeout value. Can you guide me about it?