Skip to content

Commit

Permalink
Adding responseEncoding prop type in AxiosRequestConfig (axios#3918)
Browse files Browse the repository at this point in the history
* Adding responseEncoding prop type in AxiosRequestConfig

* Update index.d.ts

Co-authored-by: Jay <jasonsaayman@gmail.com>
  • Loading branch information
FCarvalhoVII and jasonsaayman committed Dec 23, 2021
1 parent 431d5f7 commit b33c553
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,20 @@ export type ResponseType =
| 'text'
| 'stream';

export type responseEncoding =
| 'ascii' | 'ASCII'
| 'ansi' | 'ANSI'
| 'binary' | 'BINARY'
| 'base64' | 'BASE64'
| 'base64url' | 'BASE64URL'
| 'hex' | 'HEX'
| 'latin1' | 'LATIN1'
| 'ucs-2' | 'UCS-2'
| 'ucs2' | 'UCS2'
| 'utf-8' | 'UTF-8'
| 'utf8' | 'UTF8'
| 'utf16le' | 'UTF16LE';

export interface TransitionalOptions {
silentJSONParsing?: boolean;
forcedJSONParsing?: boolean;
Expand All @@ -75,6 +89,7 @@ export interface AxiosRequestConfig<D = any> {
adapter?: AxiosAdapter;
auth?: AxiosBasicCredentials;
responseType?: ResponseType;
responseEncoding?: responseEncoding | string;
xsrfCookieName?: string;
xsrfHeaderName?: string;
onUploadProgress?: (progressEvent: any) => void;
Expand Down

0 comments on commit b33c553

Please sign in to comment.