nextemos 4.5.7 → 4.5.9

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,27 +43,25 @@ const fetchRequest = () => {
43
43
  console.log(`Fetch Request: ${method} ${apiURL}`, requestOptions);
44
44
  try {
45
45
  const response = yield fetch(apiURL.toString(), requestOptions);
46
- // Headers nesnesini Object'e dönüştürme
47
- const headers = {};
48
- if (response === null || response === void 0 ? void 0 : response.headers) {
49
- response.headers.forEach((value, name) => {
50
- headers[name] = value;
51
- });
52
- }
53
46
  if (!response.ok) {
54
47
  const errorDetail = yield response.text();
55
48
  console.log("Fetch Error: ", {
56
49
  api: apiURL,
57
50
  status: response.status,
58
51
  errorMessage: errorDetail,
59
- headers
60
52
  });
61
53
  return {
62
54
  status: response.status,
63
55
  errorMessage: errorDetail,
64
- headers
65
56
  };
66
57
  }
58
+ // Headers nesnesini Object'e dönüştürme
59
+ const headers = {};
60
+ if (response === null || response === void 0 ? void 0 : response.headers) {
61
+ response.headers.forEach((value, name) => {
62
+ headers[name] = value;
63
+ });
64
+ }
67
65
  let responseModel;
68
66
  if (Object.keys(headers).length > 0 &&
69
67
  headers.hasOwnProperty('content-type') &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nextemos",
3
- "version": "4.5.7",
3
+ "version": "4.5.9",
4
4
  "description": "For helpers and hooks used in NextJS projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "./dist/index.d.ts",