Is it possible to send json data in body of GET method defined in API Gateway REST API ?

0

Is it possible to send json data in body of GET method defined in API Gateway REST API ? The REST API defined in APIGW will act as a pass through for an existing REST API. When tested the data passed in the body is not received by the underlying API. The customer is suggested to send data in query string but there are certain code changes in the underlying API which will take some time.

1 réponse
0
Réponse acceptée

It depends on the integration. For instance, when using Lambda integration, the payload is sent to the backend. When using HTTP or VPC Link, the payload will be sent to the backend, only if you choose the integration method to be POST (maybe also PUT).

So, if you create a resource with a GET method and you configure it to integrate with an HTTP/VPC backend using a POST method, the payload will be sent to the backend.

profile pictureAWS
EXPERT
Uri
répondu il y a 2 ans
profile picture
EXPERT
vérifié il y a un mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions