Access HTTP request (headers, query string, cookies, body) object in lambda with http endpoint

后端 未结 4 1411
忘掉有多难
忘掉有多难 2021-02-13 23:00

I am trying to see how to access the request header and body values from with in the lambda code. If the request body is in JSON format, it automatically seems to be parsed and

4条回答
  •  猫巷女王i
    2021-02-13 23:57

    Seems like if no "Content-Type" is sent, AWS API Gateway defaults it to "application/json": https://forums.aws.amazon.com/thread.jspa?threadID=215471

    So just define the Mapping Template for "application/json".

提交回复
热议问题