I have an AWS API gateway proxy method. If I post data to AWS API gateway, then AWS API gateway posts data to my PHP backend. I have this mapping template in API gateway:
{
"body-json" : $input.json('$'),
"context" : {
"cognito-identity-id" : "$context.identity.cognitoIdentityId"
}
}
The problem is that API gateway posts data in JSON format. And PHP does not understand JSON (content type application/json), $_POST array is empty. PHP understands application/x-www-form-urlencoded format. How to make AWS API gateway to send data in x-www-form-urlencoded format?