nextemos 5.5.10 → 5.5.12

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.
@@ -58,6 +58,14 @@ const fetchRequest = () => {
58
58
  method === __1.HTTPMethod.PUT ||
59
59
  method === __1.HTTPMethod.DELETE) {
60
60
  options.headers = Object.assign({ ["Content-Type"]: "application/json" }, options.headers);
61
+ // if output-cache-key is in headers, append it to the body
62
+ const outputCacheKey = options.headers &&
63
+ options.headers["output-cache-key"];
64
+ if (outputCacheKey) {
65
+ options.body = JSON.stringify(Object.assign(Object.assign({}, (typeof options.body === "string"
66
+ ? JSON.parse(options.body || "{}")
67
+ : {})), (outputCacheKey ? { outputCacheKey } : {})));
68
+ }
61
69
  }
62
70
  // İstek seçeneklerini oluştur
63
71
  const requestOptions = Object.assign(Object.assign({}, options), { method });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nextemos",
3
- "version": "5.5.10",
3
+ "version": "5.5.12",
4
4
  "description": "For helpers and hooks used in NextJS projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "./dist/index.d.ts",