Multiple timeouts for superagent.

This commit is contained in:
Michael Ledin
2017-06-13 22:15:54 +03:00
parent 8cb0a9fc2f
commit 37b1140f03
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -112,7 +112,7 @@ declare namespace request {
send(data?: string | object): this;
set(field: string, val: string): this;
set(field: object): this;
timeout(ms: number): this;
timeout(ms: number | { deadline?: number, response?: number }): this;
type(val: string): this;
unset(field: string): this;
use(fn: Plugin): this;
+1
View File
@@ -207,6 +207,7 @@ req.abort();
// Request timeouts
req.timeout(100);
req.timeout({ response: 5000, deadline: 60000 });
const reqUrl: string = req.url;
const reqMethod: string = req.method;