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:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user