File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed
Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -113,9 +113,9 @@ export class HttpClient {
113113 logDebug ( `isDeepL: ${ isDeepL } ` ) ;
114114
115115 const axiosRequestConfig : AxiosRequestConfig = {
116- url : isDeepL ? url : undefined ,
116+ url,
117117 method,
118- baseURL : isDeepL ? this . serverUrl : url ,
118+ baseURL : isDeepL ? this . serverUrl : undefined ,
119119 headers,
120120 responseType : responseAsStream ? 'stream' : 'text' ,
121121 timeout : timeoutMs ,
@@ -247,19 +247,10 @@ export class HttpClient {
247247 }
248248 }
249249
250- let contentType : string | undefined = undefined ;
251- if ( response . headers . getContentType ) {
252- if ( typeof response . headers . getContentType === 'string' ) {
253- contentType = response . headers . getContentType ;
254- } else {
255- contentType = response . headers . getContentType ( ) ?. toString ( ) ?? undefined ;
256- }
257- }
258-
259250 return {
260251 statusCode : response . status ,
261252 content : response . data ,
262- contentType : contentType ,
253+ contentType : response . headers [ 'content-type' ] ,
263254 } ;
264255 } catch ( axios_error_raw ) {
265256 const axiosError = axios_error_raw as AxiosError ;
You can’t perform that action at this time.
0 commit comments