Amazon API Gateway : response body is not transformed when the API is called via Postman?

前端 未结 2 1981
误落风尘
误落风尘 2021-01-13 17:11

When executing a testvia the AWS API Gateway console, I see that the output response from the Lambda function is correctly transformed:

{
  \"type\" : \"\",
         


        
2条回答
  •  囚心锁ツ
    2021-01-13 18:00

    The difference between Test Invoke on API Gateway Console and actual Invoke with API Gateway is the test invoke is always assuming the content-type is "application/json" and accept "application/json". You might want to pass "application/json" with the header accept when you invoke via Postman.

提交回复
热议问题