how can I use proxy+ to handle the root resource on api gateway to return body?

Viewed 908

API Gateway with proxy+ works fine for me, the only thing is that the root path always return "Missing Authentication Token", so I found I should setup "ANY" method for the root path, but it would return the response with header in json.

{
  "statusCode": 200,
  "body": "{\"message\":\"Welcome!\"}",
  "headers": {
    "x-powered-by": "Express",
    "access-control-allow-origin": "*",
    "content-type": "application/json; charset=utf-8",
    "content-length": "22",
    "etag": "W/\"16-XP9xOOkLTTczHdpNV2DV26X8ykM\"",
    "date": "Tue, 03 Mar 2020 01:15:05 GMT",
    "connection": "close"
  },
  "isBase64Encoded": false
}

how can I get return only the body?

1 Answers

I found the solution, we could just use proxy when we setup the "get" (or "any") method on root.

enter image description here

if you have already setup the on the method, you update it on integration request

enter image description here

Related