Hi, there are two options:
-
Use the built-in response transformation middleware functionality: Response Body Transform, Response Header Injection and Response Header Deletion. You will find more details here.
-
We don’t support custom response middleware directly but you can use a feature called
ReturnOverrideswhich enables the usage of your own implementation to hit the upstream endpoint, the steps are:
- Create a custom middleware.
- Send the request to upstream using your middleware implementation (typically using a HTTP module in the language you’re using).
- Set the
ReturnOverridesfield on the request object.
More details on this field here. This approach is available on rich plugins, gRPC or Python based, I suggest starting here.