From 70cb023ac80d20a46c5280dab20f34117a50ed45 Mon Sep 17 00:00:00 2001 From: Mingyang Li <53138432+Mingyang-Li@users.noreply.github.com> Date: Fri, 18 Aug 2023 11:30:52 +1200 Subject: [PATCH] fix: use correct curl command for creating notes (#727) The original request body of the example has parsing issues once executed, I've updated it with the payload that worked for me --- _chapters/secure-our-serverless-apis.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_chapters/secure-our-serverless-apis.md b/_chapters/secure-our-serverless-apis.md index 451199264..f6716be19 100644 --- a/_chapters/secure-our-serverless-apis.md +++ b/_chapters/secure-our-serverless-apis.md @@ -132,7 +132,7 @@ While this might look intimidating, just keep in mind that behind the scenes all If you are on Windows, use the command below. The space between each option is very important. ```bash -$ npx aws-api-gateway-cli-test --username admin@example.com --password Passw0rd! --user-pool-id USER_POOL_ID --app-client-id USER_POOL_CLIENT_ID --cognito-region COGNITO_REGION --identity-pool-id IDENTITY_POOL_ID --invoke-url API_ENDPOINT --api-gateway-region API_REGION --path-template /notes --method POST --body "{\"content\":\"hello world\",\"attachment\":\"hello.jpg\"}" +$ npx aws-api-gateway-cli-test --username admin@example.com --password Passw0rd! --user-pool-id USER_POOL_ID --app-client-id USER_POOL_CLIENT_ID --cognito-region COGNITO_REGION --identity-pool-id IDENTITY_POOL_ID --invoke-url API_ENDPOINT --api-gateway-region API_REGION --path-template /notes --method POST --body '{""content\":\"hello world\",\"attachment\":\"hello.jpg\"}' ``` If the command is successful, the response will look similar to this.