1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-09-18 15:25:33 -04:00

fix body of API response

This commit is contained in:
2020-08-12 10:33:52 -04:00
parent a0671a6dea
commit 347c577d3a

View File

@@ -23,6 +23,7 @@ exports.handler = function (event, context, callback) {
url: endpointUrl,
headers: reqHeaders,
params: reqQuery,
responseType: "arraybuffer",
timeout: 3000,
};
@@ -44,7 +45,8 @@ exports.handler = function (event, context, callback) {
callback(null, {
statusCode: response.status,
headers: resHeaders,
body: response.body,
body: response.data.toString("base64"),
isBase64Encoded: true,
});
})
.catch(function (error) {