feat: got request timeout

This commit is contained in:
DIYgod
2021-02-01 20:06:49 +08:00
parent 177c36cae7
commit 89e82d88fa
4 changed files with 25 additions and 0 deletions

View File

@@ -33,6 +33,7 @@ const custom = got.extend({
headers: {
'user-agent': config.ua,
},
timeout: config.requestTimeout,
});
custom.all = (list) => Promise.all(list);