@webtypen/webframez-core 0.0.37 → 0.0.39

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.
@@ -200,7 +200,7 @@ class RouterFacade {
200
200
  let body = [];
201
201
  const bodyPlain = this.mode === "aws-lambda"
202
202
  ? options && options.event && options.event.body
203
- ? Buffer.concat(options.event.body).toString()
203
+ ? options.event.body
204
204
  : null
205
205
  : req
206
206
  ? yield new Promise((resolve) => {
@@ -220,7 +220,9 @@ class RouterFacade {
220
220
  (bodyPlain.trim().substring(0, 1) === "[" || bodyPlain.trim().substring(0, 1) === "{")
221
221
  ? JSON.parse(bodyPlain)
222
222
  : bodyPlain
223
- ? qs_1.default.parse(bodyPlain)
223
+ ? qs_1.default.parse(options && options.event && options.event.isBase64Encoded
224
+ ? Buffer.from(bodyPlain, "base64").toString("utf-8")
225
+ : bodyPlain)
224
226
  : {},
225
227
  bodyPlain: bodyPlain,
226
228
  params: route && route.params ? route.params : {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webtypen/webframez-core",
3
- "version": "0.0.37",
3
+ "version": "0.0.39",
4
4
  "description": "The core package of the typescript based webframez (web-framework) by webtypen.de",
5
5
  "homepage": "https://webtypen.de/",
6
6
  "license": "MIT",
@@ -233,7 +233,7 @@ class RouterFacade {
233
233
  const bodyPlain: any =
234
234
  this.mode === "aws-lambda"
235
235
  ? options && options.event && options.event.body
236
- ? Buffer.concat(options.event.body).toString()
236
+ ? options.event.body
237
237
  : null
238
238
  : req
239
239
  ? await new Promise((resolve: Function) => {
@@ -256,8 +256,13 @@ class RouterFacade {
256
256
  (bodyPlain.trim().substring(0, 1) === "[" || bodyPlain.trim().substring(0, 1) === "{")
257
257
  ? JSON.parse(bodyPlain)
258
258
  : bodyPlain
259
- ? qs.parse(bodyPlain)
259
+ ? qs.parse(
260
+ options && options.event && options.event.isBase64Encoded
261
+ ? Buffer.from(bodyPlain, "base64").toString("utf-8")
262
+ : bodyPlain
263
+ )
260
264
  : {},
265
+
261
266
  bodyPlain: bodyPlain,
262
267
  params: route && route.params ? route.params : {},
263
268
  headers: customRequest.headers,