mezon-sdk 2.7.4 → 2.7.6
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/mezon-sdk.cjs.js +5193 -6248
- package/jest.config.js +9 -0
- package/nodemon.json +6 -0
- package/package.json +1 -1
- package/utils.ts +0 -8
package/jest.config.js
ADDED
package/nodemon.json
ADDED
package/package.json
CHANGED
package/utils.ts
CHANGED
|
@@ -4,14 +4,6 @@ export function buildFetchOptions(method: string, options: any, bodyJson: string
|
|
|
4
4
|
const fetchOptions = {...{ method: method }, ...options};
|
|
5
5
|
fetchOptions.headers = {...options.headers};
|
|
6
6
|
|
|
7
|
-
const descriptor = Object.getOwnPropertyDescriptor(XMLHttpRequest.prototype, "withCredentials");
|
|
8
|
-
|
|
9
|
-
// in Cocos Creator, XMLHttpRequest.withCredentials is not writable, so make the fetch
|
|
10
|
-
// polyfill avoid writing to it.
|
|
11
|
-
if (!descriptor?.set) {
|
|
12
|
-
fetchOptions.credentials = 'cocos-ignore'; // string value is arbitrary, cannot be 'omit' or 'include
|
|
13
|
-
}
|
|
14
|
-
|
|
15
7
|
if(!Object.keys(fetchOptions.headers).includes("Accept")) {
|
|
16
8
|
fetchOptions.headers["Accept"] = "application/json";
|
|
17
9
|
}
|