mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Multiple timeouts for superagent.
This commit is contained in:
Vendored
+1
-1
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user