mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 15:57:13 +00:00
Merge pull request #33398 from theQuazz/superagent-response-redirects
Add response.redirects: string[] property to superagent Responses
This commit is contained in:
Vendored
+2
@@ -7,6 +7,7 @@
|
||||
// Alec Zopf <https://github.com/zopf>
|
||||
// Adam Haglund <https://github.com/beeequeue>
|
||||
// Lukas Elmer <https://github.com/lukaselmer>
|
||||
// Jesse Rogers <https://github.com/theQuazz>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
@@ -116,6 +117,7 @@ declare namespace request {
|
||||
type: string;
|
||||
unauthorized: boolean;
|
||||
xhr: XMLHttpRequest;
|
||||
redirects: string[];
|
||||
}
|
||||
|
||||
interface Request extends Promise<Response> {
|
||||
|
||||
@@ -202,6 +202,7 @@ request('/search')
|
||||
const contentLength = res.header['content-length'];
|
||||
const contentType: string = res.type;
|
||||
const charset: string = res.charset;
|
||||
const redirects: string[] = res.redirects;
|
||||
});
|
||||
|
||||
// Getting response 'Set-Cookie'
|
||||
|
||||
Vendored
+1
@@ -89,6 +89,7 @@ declare namespace request {
|
||||
forbidden: boolean;
|
||||
xhr: XMLHttpRequest;
|
||||
get(header: string): string;
|
||||
redirects: string[];
|
||||
}
|
||||
|
||||
interface Request extends Promise<Response> /* extends NodeJS.WritableStream */ {
|
||||
|
||||
@@ -181,6 +181,7 @@ request('/search')
|
||||
const contentLength = res.header['content-length'];
|
||||
const contentType: string = res.type;
|
||||
const charset: string = res.charset;
|
||||
const redirects: string[] = res.redirects;
|
||||
});
|
||||
|
||||
// Custom parsers
|
||||
|
||||
Reference in New Issue
Block a user