2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-17 19:21:29 +03:00

Adding support for timeout config

closes #56
This commit is contained in:
mzabriskie
2015-06-18 21:56:22 -06:00
parent 0e33680f40
commit ffc0237a17
3 changed files with 10 additions and 0 deletions
+5
View File
@@ -88,6 +88,11 @@ module.exports = function httpAdapter(resolve, reject, config) {
reject(err);
});
// Handle request timeout
req.setTimeout(config.timeout, function () {
req.abort();
});
// Send the request
req.end(data);
};