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?

demandé il y a 9 mois464 vues
1 réponse
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
EXPERT
répondu il y a 9 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