Pass custom header to http endpoint via api gateway

0

I am passing a custom header x-api-testing-latency to my api. It basically has value in miliseconds and API uses the value to add latency to execution. This is for testing different use cases of client(app).

It works when I directly access the http endpoint, but while on hitting the endpoint via api gateway headers are filtered and not received by application.

How should it should be solved?

1 Risposta
0

Hi there.

I believe this could be achieved using Data Transformation. According to the documentation:

In API Gateway, an API's method request can take a payload in a different format from the integration request payload. Similarly, the backend may return an integration response payload different from the method response payload. You can map URL path parameters, URL query string parameters, HTTP headers, and the request body across API Gateway using mapping templates.

Please let me know if this helps.

profile pictureAWS
ESPERTO
con risposta 9 mesi 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