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 {
113
113
logDebug ( `isDeepL: ${ isDeepL } ` ) ;
114
114
115
115
const axiosRequestConfig : AxiosRequestConfig = {
116
- url : isDeepL ? url : undefined ,
116
+ url,
117
117
method,
118
- baseURL : isDeepL ? this . serverUrl : url ,
118
+ baseURL : isDeepL ? this . serverUrl : undefined ,
119
119
headers,
120
120
responseType : responseAsStream ? 'stream' : 'text' ,
121
121
timeout : timeoutMs ,
@@ -247,19 +247,10 @@ export class HttpClient {
247
247
}
248
248
}
249
249
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
-
259
250
return {
260
251
statusCode : response . status ,
261
252
content : response . data ,
262
- contentType : contentType ,
253
+ contentType : response . headers [ 'content-type' ] ,
263
254
} ;
264
255
} catch ( axios_error_raw ) {
265
256
const axiosError = axios_error_raw as AxiosError ;
You can’t perform that action at this time.
0 commit comments