@bexis2/bexis2-core-ui 0.4.49 → 0.4.50
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/services/Api.js +2 -1
- package/package.json +1 -1
- package/src/lib/services/Api.ts +2 -1
package/dist/services/Api.js
CHANGED
|
@@ -12,8 +12,9 @@ const apiRequest = (method, url, request) => {
|
|
|
12
12
|
authorization: 'Basic ' + btoa(username + ':' + password)
|
|
13
13
|
};
|
|
14
14
|
const requestVerificationToken = csrfToken;
|
|
15
|
-
if (requestVerificationToken) {
|
|
15
|
+
if (method === 'post' && requestVerificationToken) {
|
|
16
16
|
headers['__RequestVerificationToken'] = requestVerificationToken;
|
|
17
|
+
headers['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
17
18
|
}
|
|
18
19
|
//using the axios instance to perform the request that received from each http method
|
|
19
20
|
return axiosAPI({
|
package/package.json
CHANGED
package/src/lib/services/Api.ts
CHANGED
|
@@ -18,8 +18,9 @@ const apiRequest = (method, url, request) => {
|
|
|
18
18
|
|
|
19
19
|
const requestVerificationToken = csrfToken;
|
|
20
20
|
|
|
21
|
-
if (requestVerificationToken) {
|
|
21
|
+
if (method==='post' && requestVerificationToken) {
|
|
22
22
|
headers['__RequestVerificationToken'] = requestVerificationToken;
|
|
23
|
+
headers['Content-Type']='application/x-www-form-urlencoded';
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
//using the axios instance to perform the request that received from each http method
|