@sap-ux/axios-extension 1.25.34 → 1.25.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/auth/connection.js
CHANGED
|
@@ -101,7 +101,8 @@ function throwIfHtmlLoginForm(response) {
|
|
|
101
101
|
* @returns true if the contents are determined to be HTML
|
|
102
102
|
*/
|
|
103
103
|
function isHtmlResponse(response) {
|
|
104
|
-
|
|
104
|
+
const contentTypeHeader = response.headers['content-type'];
|
|
105
|
+
return getContentType(typeof contentTypeHeader === 'string' ? contentTypeHeader : undefined, response.data).startsWith('text/html');
|
|
105
106
|
}
|
|
106
107
|
/**
|
|
107
108
|
* @param response AxiosResponse
|
|
@@ -101,7 +101,9 @@ class ODataService extends axios_1.Axios {
|
|
|
101
101
|
}
|
|
102
102
|
const response = await super.get(url, config);
|
|
103
103
|
const contentType = response.headers['content-type'] ?? response.headers['Content-Type'];
|
|
104
|
-
if (response.data &&
|
|
104
|
+
if (response.data &&
|
|
105
|
+
((typeof contentType === 'string' && contentType.includes('application/json')) ||
|
|
106
|
+
config.params?.['$format'] === 'json')) {
|
|
105
107
|
response.odata = parseODataResponse.bind(response, includeV4ControlData);
|
|
106
108
|
}
|
|
107
109
|
return response;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/axios-extension",
|
|
3
|
-
"version": "1.25.
|
|
3
|
+
"version": "1.25.35",
|
|
4
4
|
"description": "Extension of the Axios module adding convenience methods to interact with SAP systems especially with OData services.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"private": false,
|
|
15
15
|
"main": "dist/index.js",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"axios": "1.
|
|
17
|
+
"axios": "1.16.0",
|
|
18
18
|
"detect-content-type": "1.2.0",
|
|
19
19
|
"fast-xml-parser": "5.7.2",
|
|
20
20
|
"lodash": "4.18.1",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"https-proxy-agent": "7.0.6",
|
|
26
26
|
"http-proxy-agent": "7.0.2",
|
|
27
27
|
"proxy-from-env": "1.1.0",
|
|
28
|
-
"@sap-ux/btp-utils": "1.1.
|
|
28
|
+
"@sap-ux/btp-utils": "1.1.15",
|
|
29
29
|
"@sap-ux/logger": "0.8.5",
|
|
30
30
|
"@sap-ux/feature-toggle": "0.3.8"
|
|
31
31
|
},
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"nock": "14.0.11",
|
|
36
36
|
"supertest": "7.2.2",
|
|
37
37
|
"@types/proxy-from-env": "1.0.4",
|
|
38
|
-
"@sap-ux/project-access": "1.36.
|
|
38
|
+
"@sap-ux/project-access": "1.36.3"
|
|
39
39
|
},
|
|
40
40
|
"files": [
|
|
41
41
|
"dist",
|