Merge pull request #33398 from theQuazz/superagent-response-redirects

Add response.redirects: string[] property to superagent Responses
This commit is contained in:
Jesse Trinity
2019-02-27 19:01:49 -08:00
committed by GitHub
4 changed files with 5 additions and 0 deletions
+2
View File
@@ -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> {
+1
View File
@@ -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'
+1
View File
@@ -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 */ {
+1
View File
@@ -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