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개 답변
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
전문가
답변함 9달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠