First off, this library is great so thanks for making it!
I just wrote a quick set of tests to validate our site, but we have a few pages that always take longer than 2 seconds to load(magento, yuck). anyways, I don't see any way to define a longer timeout. So I dug into your code and found it to be as easy as
var getRequest = function(isLocal, options) {
var timeout = options.timeout || 2000;
var req = isLocal ? proxyRequest.post(w3cCheckUrl) : proxyRequest.get(w3cCheckUrl).timeout({response: timeout, deadline: timeout * 30});
Is this something you would be willing to accept a PR for? If so, how would you go about implementing it? This works and keeps the default basically the same as the defaults for the request library. I don't find the 'response' and 'deadline' verbage useful or meaningful at all, so I just used timeout and computed it to match the defaults. I'd be happy to handle it a better way however :)
First off, this library is great so thanks for making it!
I just wrote a quick set of tests to validate our site, but we have a few pages that always take longer than 2 seconds to load(magento, yuck). anyways, I don't see any way to define a longer timeout. So I dug into your code and found it to be as easy as
and then passing in
Is this something you would be willing to accept a PR for? If so, how would you go about implementing it? This works and keeps the default basically the same as the defaults for the request library. I don't find the 'response' and 'deadline' verbage useful or meaningful at all, so I just used timeout and computed it to match the defaults. I'd be happy to handle it a better way however :)