remult 0.19.1 → 0.19.2-exp.0
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.
|
@@ -174,9 +174,9 @@ export class RestDataProviderHttpProviderUsingFetch {
|
|
|
174
174
|
}));
|
|
175
175
|
}
|
|
176
176
|
myFetch(url, options) {
|
|
177
|
-
const headers = {
|
|
178
|
-
|
|
179
|
-
|
|
177
|
+
const headers = {};
|
|
178
|
+
if (options?.body)
|
|
179
|
+
headers["Content-type"] = "application/json";
|
|
180
180
|
if (typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof (window.document.cookie !== 'undefined'))
|
|
181
181
|
for (const cookie of window.document.cookie.split(';')) {
|
|
182
182
|
if (cookie.trim().startsWith('XSRF-TOKEN=')) {
|
package/package.json
CHANGED
|
@@ -273,9 +273,9 @@ var RestDataProviderHttpProviderUsingFetch = /** @class */ (function () {
|
|
|
273
273
|
RestDataProviderHttpProviderUsingFetch.prototype.myFetch = function (url, options) {
|
|
274
274
|
var e_5, _a;
|
|
275
275
|
var _this = this;
|
|
276
|
-
var headers = {
|
|
277
|
-
|
|
278
|
-
|
|
276
|
+
var headers = {};
|
|
277
|
+
if (options === null || options === void 0 ? void 0 : options.body)
|
|
278
|
+
headers["Content-type"] = "application/json";
|
|
279
279
|
if (typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof (window.document.cookie !== 'undefined'))
|
|
280
280
|
try {
|
|
281
281
|
for (var _b = tslib_1.__values(window.document.cookie.split(';')), _c = _b.next(); !_c.done; _c = _b.next()) {
|