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 Risposta
0
Risposta accettata

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
ESPERTO
Uri
con risposta 2 anni fa
profile picture
ESPERTO
verificato un mese fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande