diff --git a/index.d.ts b/index.d.ts index ed9f858f34..b681915e16 100644 --- a/index.d.ts +++ b/index.d.ts @@ -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; @@ -75,6 +89,7 @@ export interface AxiosRequestConfig { adapter?: AxiosAdapter; auth?: AxiosBasicCredentials; responseType?: ResponseType; + responseEncoding?: responseEncoding | string; xsrfCookieName?: string; xsrfHeaderName?: string; onUploadProgress?: (progressEvent: any) => void;