The original request body of the example has parsing issues once executed, I've updated it with the payload that worked for me.
Details
❌ Console outputs when using --body "{\"content\":\"hello world\",\"attachment\":\"hello.jpg\"}"
Getting temporary credentials
Making API request
undefined:1
{\
^
at JSON.parse (<anonymous>)
at makeRequest (C:\Users\admin\AppData\Local\npm-cache\_npx\ea84c6478cf14779\node_modules\aws-api-gateway-cli-test\index.js:179:17)
etc etc
✅ Console outputs when using --body '{""content\":\"hello world\",\"attachment\":\"hello.jpg\"}'
Authenticating with User Pool
Getting temporary credentials
Making API request
{
status: 200,
statusText: 'OK',
data: {
userId: 'PLACEHOLDER',
noteId: 'PLACEHOLDER',
content: 'hello world',
attachment: 'hello.jpg',
createdAt: PLACEHOLDER
}
}
Issue
The original request body of the example has parsing issues once executed, I've updated it with the payload that worked for me.
Details
❌ Console outputs when using
--body "{\"content\":\"hello world\",\"attachment\":\"hello.jpg\"}"
✅ Console outputs when using
--body '{""content\":\"hello world\",\"attachment\":\"hello.jpg\"}'