@faasjs/http 0.0.3-beta.17 → 0.0.3-beta.19
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/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -495,7 +495,7 @@ var Http = class {
|
|
|
495
495
|
if (data.event.body) {
|
|
496
496
|
if ((_a = this.headers["content-type"]) == null ? void 0 : _a.includes("application/json")) {
|
|
497
497
|
data.logger.debug("[onInvoke] Parse params from json body");
|
|
498
|
-
this.params = Object.assign(this.params, JSON.parse(data.event.body));
|
|
498
|
+
this.params = Object.keys(this.params).length ? Object.assign(this.params, JSON.parse(data.event.body)) : JSON.parse(data.event.body);
|
|
499
499
|
} else {
|
|
500
500
|
data.logger.debug("[onInvoke] Parse params from raw body");
|
|
501
501
|
this.params = data.event.body || /* @__PURE__ */ Object.create(null);
|
package/dist/index.mjs
CHANGED
|
@@ -485,7 +485,7 @@ var Http = class {
|
|
|
485
485
|
if (data.event.body) {
|
|
486
486
|
if ((_a = this.headers["content-type"]) == null ? void 0 : _a.includes("application/json")) {
|
|
487
487
|
data.logger.debug("[onInvoke] Parse params from json body");
|
|
488
|
-
this.params = Object.assign(this.params, JSON.parse(data.event.body));
|
|
488
|
+
this.params = Object.keys(this.params).length ? Object.assign(this.params, JSON.parse(data.event.body)) : JSON.parse(data.event.body);
|
|
489
489
|
} else {
|
|
490
490
|
data.logger.debug("[onInvoke] Parse params from raw body");
|
|
491
491
|
this.params = data.event.body || /* @__PURE__ */ Object.create(null);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faasjs/http",
|
|
3
|
-
"version": "0.0.3-beta.
|
|
3
|
+
"version": "0.0.3-beta.19",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"dist"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@faasjs/func": "^0.0.3-beta.
|
|
27
|
-
"@faasjs/logger": "^0.0.3-beta.
|
|
26
|
+
"@faasjs/func": "^0.0.3-beta.19",
|
|
27
|
+
"@faasjs/logger": "^0.0.3-beta.19"
|
|
28
28
|
},
|
|
29
29
|
"engines": {
|
|
30
30
|
"npm": ">=8.0.0",
|