Skip to content

Commit 4fbf61d

Browse files
Adding responseEncoding prop type in AxiosRequestConfig (#3918)
* Adding responseEncoding prop type in AxiosRequestConfig * Update index.d.ts Co-authored-by: Jay <[email protected]>
1 parent a76571a commit 4fbf61d

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

index.d.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,20 @@ export type ResponseType =
5353
| 'text'
5454
| 'stream';
5555

56+
export type responseEncoding =
57+
| 'ascii' | 'ASCII'
58+
| 'ansi' | 'ANSI'
59+
| 'binary' | 'BINARY'
60+
| 'base64' | 'BASE64'
61+
| 'base64url' | 'BASE64URL'
62+
| 'hex' | 'HEX'
63+
| 'latin1' | 'LATIN1'
64+
| 'ucs-2' | 'UCS-2'
65+
| 'ucs2' | 'UCS2'
66+
| 'utf-8' | 'UTF-8'
67+
| 'utf8' | 'UTF8'
68+
| 'utf16le' | 'UTF16LE';
69+
5670
export interface TransitionalOptions {
5771
silentJSONParsing?: boolean;
5872
forcedJSONParsing?: boolean;
@@ -75,6 +89,7 @@ export interface AxiosRequestConfig<D = any> {
7589
adapter?: AxiosAdapter;
7690
auth?: AxiosBasicCredentials;
7791
responseType?: ResponseType;
92+
responseEncoding?: responseEncoding | string;
7893
xsrfCookieName?: string;
7994
xsrfHeaderName?: string;
8095
onUploadProgress?: (progressEvent: any) => void;

0 commit comments

Comments
 (0)