nextemos 2.3.2 → 2.3.3
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.
|
@@ -43,9 +43,12 @@ const fetchRequest = () => {
|
|
|
43
43
|
const response = yield fetch(apiURL.toString(), Object.assign(Object.assign({}, options), { method }));
|
|
44
44
|
// Headers nesnesini Object'e dönüştürme
|
|
45
45
|
const headers = {};
|
|
46
|
-
response.headers
|
|
47
|
-
headers
|
|
48
|
-
|
|
46
|
+
if (response.headers) {
|
|
47
|
+
response.headers.forEach((value, name) => {
|
|
48
|
+
headers[name] = value;
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
// response data nesnesini JSON'a dönüştürme.
|
|
49
52
|
const responseData = yield response.json().catch(() => ({}));
|
|
50
53
|
if (!response.ok) {
|
|
51
54
|
const errorMessage = (responseData === null || responseData === void 0 ? void 0 : responseData.message) || 'Bir şeyler yanlış gitti!';
|