configurapi-runner-lambda-api 1.1.0 → 1.2.0
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/package.json +1 -1
- package/src/LambdaApiAdapter.js +4 -3
package/package.json
CHANGED
package/src/LambdaApiAdapter.js
CHANGED
|
@@ -13,7 +13,7 @@ module.exports = {
|
|
|
13
13
|
|
|
14
14
|
if(response.body instanceof Buffer)
|
|
15
15
|
{
|
|
16
|
-
body = response.body;
|
|
16
|
+
body = response.body.toString('base64');
|
|
17
17
|
}
|
|
18
18
|
else if(response.body instanceof String || typeof response.body === 'string')
|
|
19
19
|
{
|
|
@@ -40,7 +40,7 @@ module.exports = {
|
|
|
40
40
|
headers: response.headers,
|
|
41
41
|
body: body,
|
|
42
42
|
statusDescription: `${response.statusCode} ${status[response.statusCode]}`,
|
|
43
|
-
isBase64Encoded:
|
|
43
|
+
isBase64Encoded: response.body instanceof Buffer,
|
|
44
44
|
multiValueHeaders: Object.keys(response.headers).reduce((memo, k) => {
|
|
45
45
|
memo[k] = [response.headers[k]];
|
|
46
46
|
return memo;
|
|
@@ -50,7 +50,8 @@ module.exports = {
|
|
|
50
50
|
return {
|
|
51
51
|
statusCode: response.statusCode,
|
|
52
52
|
headers: response.headers,
|
|
53
|
-
body: body
|
|
53
|
+
body: body,
|
|
54
|
+
isBase64Encoded: response.body instanceof Buffer
|
|
54
55
|
};
|
|
55
56
|
},
|
|
56
57
|
|