From 4fbf61dc751ad69c7df9977d6edf7cf7ee87a5fb Mon Sep 17 00:00:00 2001 From: Felipe Carvalho <59848912+FCarvalhoVII@users.noreply.github.com> Date: Thu, 23 Dec 2021 14:07:46 -0300 Subject: [PATCH] Adding responseEncoding prop type in AxiosRequestConfig (#3918) * Adding responseEncoding prop type in AxiosRequestConfig * Update index.d.ts Co-authored-by: Jay --- index.d.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/index.d.ts b/index.d.ts index ed9f858..b681915 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;