var req = {
    method: '{{method}}',
    uri: domain + path,
    qs: queryParameters,
    headers: headers,
    body: body,
    timeout: timeout
};
if(Object.keys(form).length > 0) {
    req.form = form;
}
if(typeof(body) === 'object') {
    req.json = true;
}
makeRequest();
function makeRequest() {
    if (reqOut) {
        for(var key in req) {
            reqOut[key] = req[key];
        }
    }
    request(req, function(error, response, body){
        if(error) {
            if ((error.code === "ETIMEDOUT") && (retries > 0)) {
                retries--;
                return makeRequest();  // Try again...
            }
            deferred.reject(error);
        } else {
            if(/^application\/(.*\\+)?json/.test(response.headers['content-type'])) {
                try {
                    body = JSON.parse(body);
                } catch(e) {
                
                }
            }
            if(response.statusCode >= 200 && response.statusCode <= 299) {
               deferred.resolve({ response: response, body: body });
            } else {
               deferred.reject({ response: response, body: body });
            }
        }
    });
}

if (timeout !== undefined) {
    timeout = parseInt(timeout);
}

var req = {
    method: '{{method}}',
    uri: domain + path,
    qs: queryParameters,
    headers: headers,
    body: body,
    timeout: timeout
};
if(Object.keys(form).length > 0) {
    req.form = form;
}
if(typeof(body) === 'object') {
    req.json = true;
}
makeRequest();
function makeRequest() {
    if (reqOut) {
        for(var key in req) {
            reqOut[key] = req[key];
        }
    }
    request(req, function(error, response, body){
        if(error) {
            if ((error.code === "ETIMEDOUT") && (retries > 0)) {
                retries--;
                return makeRequest();  // Try again...
            }
            deferred.reject(error);
        } else {
            if(/^application\/(.*\\+)?json/.test(response.headers['content-type'])) {
                try {
                    body = JSON.parse(body);
                } catch(e) {
                
                }
            }
            if(response.statusCode >= 200 && response.statusCode <= 299) {
               deferred.resolve({ response: response, body: body });
            } else {
               deferred.reject({ response: response, body: body });
            }
        }
    });
}

Make sure that "timeout" is a number
Make sure that "timeout" is a number

This crashes Node when running on Windows but not on Linux...