Saggi Bashari
Saggi Bashari

Reputation: 23

AWS - Api Gateway POST body with Content-Type: text/plain instead json/application to lambda

REQUEST: POST body to ApiGateway to Lambda with Content-type:text/plain

RESPONSE: "message": "Internal server error"

Body example:

{"a":"first", "b":"second"}

Which configuration did i need to change to accept this Content-Type? For json/application, it works just fine.

Upvotes: 2

Views: 1528

Answers (1)

sheldonzy
sheldonzy

Reputation: 5971

When creating a resource, use lambda proxy integration.

enter image description here

For more information read here.

Upvotes: 0

Related Questions