@schukai/monster 3.100.16 → 3.100.17
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/CHANGELOG.md
CHANGED
package/package.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.6.13","@popperjs/core":"^2.11.8"},"description":"Monster is a simple library for creating fast, robust and lightweight websites.","homepage":"https://monsterjs.org/","keywords":["framework","web","dom","css","sass","mobile-first","app","front-end","templates","schukai","core","shopcloud","alvine","monster","buildmap","stack","observer","observable","uuid","node","nodelist","css-in-js","logger","log","theme"],"license":"AGPL 3.0","main":"source/monster.mjs","module":"source/monster.mjs","name":"@schukai/monster","repository":{"type":"git","url":"https://gitlab.schukai.com/oss/libraries/javascript/monster.git"},"type":"module","version":"3.100.
|
1
|
+
{"author":"schukai GmbH","dependencies":{"@floating-ui/dom":"^1.6.13","@popperjs/core":"^2.11.8"},"description":"Monster is a simple library for creating fast, robust and lightweight websites.","homepage":"https://monsterjs.org/","keywords":["framework","web","dom","css","sass","mobile-first","app","front-end","templates","schukai","core","shopcloud","alvine","monster","buildmap","stack","observer","observable","uuid","node","nodelist","css-in-js","logger","log","theme"],"license":"AGPL 3.0","main":"source/monster.mjs","module":"source/monster.mjs","name":"@schukai/monster","repository":{"type":"git","url":"https://gitlab.schukai.com/oss/libraries/javascript/monster.git"},"type":"module","version":"3.100.17"}
|
@@ -12,10 +12,8 @@
|
|
12
12
|
* SPDX-License-Identifier: AGPL-3.0
|
13
13
|
*/
|
14
14
|
|
15
|
-
import { diff } from "../../../data/diff.mjs";
|
16
15
|
import { addAttributeToken } from "../../../dom/attributes.mjs";
|
17
16
|
import { ATTRIBUTE_ERRORMESSAGE } from "../../../dom/constants.mjs";
|
18
|
-
import { isArray } from "../../../types/is.mjs";
|
19
17
|
import { Datasource, dataSourceSymbol } from "../datasource.mjs";
|
20
18
|
import { DatasourceStyleSheet } from "../stylesheet/datasource.mjs";
|
21
19
|
import { instanceSymbol } from "../../../constants.mjs";
|
@@ -94,6 +94,7 @@ class RestAPI extends Server {
|
|
94
94
|
write: {
|
95
95
|
init: {
|
96
96
|
method: "POST",
|
97
|
+
headers: null,
|
97
98
|
},
|
98
99
|
responseCallback: null,
|
99
100
|
acceptedStatus: [200, 201],
|
@@ -117,6 +118,7 @@ class RestAPI extends Server {
|
|
117
118
|
read: {
|
118
119
|
init: {
|
119
120
|
method: "GET",
|
121
|
+
headers: null,
|
120
122
|
},
|
121
123
|
path: null,
|
122
124
|
responseCallback: null,
|
@@ -140,6 +142,11 @@ class RestAPI extends Server {
|
|
140
142
|
let init = this.getOption("read.init");
|
141
143
|
if (!isObject(init)) init = {};
|
142
144
|
if (!init["method"]) init["method"] = "GET";
|
145
|
+
if (typeof init["headers"] !== "object") {
|
146
|
+
init["headers"] = {
|
147
|
+
"Accept": "application/json",
|
148
|
+
};
|
149
|
+
}
|
143
150
|
|
144
151
|
let callback = this.getOption("read.responseCallback");
|
145
152
|
if (!callback) {
|
@@ -161,6 +168,7 @@ class RestAPI extends Server {
|
|
161
168
|
if (typeof init["headers"] !== "object") {
|
162
169
|
init["headers"] = {
|
163
170
|
"Content-Type": "application/json",
|
171
|
+
"Accept": "application/json",
|
164
172
|
};
|
165
173
|
}
|
166
174
|
if (!init["method"]) init["method"] = "POST";
|