Skip to content

Commit 6250688

Browse files
VamOSGSRachel Lee Nabors
authored andcommitted
Update [platform].mdx (#4533)
1 parent f962180 commit 6250688

File tree

1 file changed

+7
-2
lines changed
  • src/pages/guides/functions/appsync-operations-to-lambda-layer/q/platform

1 file changed

+7
-2
lines changed

src/pages/guides/functions/appsync-operations-to-lambda-layer/q/platform/[platform].mdx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,13 @@ exports.request = (queryDetails, appsyncUrl, apiKey) => {
5858

5959
return new Promise((resolve, reject) => {
6060
const httpRequest = https.request({ ...req, host: endpoint }, (result) => {
61-
result.on('data', (data) => {
62-
resolve(JSON.parse(data.toString()))
61+
let response = ''
62+
result.on('data', (chunk) => {
63+
response += chunk
64+
})
65+
result.on('end', () => {
66+
response = JSON.parse(response)
67+
resolve(response)
6368
})
6469
})
6570

0 commit comments

Comments
 (0)