I’m facing an issue with using a HTTP proxy for which I currently see no solution. I hope you’ll be able to help me.
I’ve created a http proxy for forwarding requests to an external party. In the URL I need to specify an id. So my request URI in the http proxy looks somewhat like this: https://www.example.com/${id}/dosomething
This ID is given in the POST data that the proxy receives.
However: the external URL expects the POST data to contain some specific format. For example:
{“field1”: “Value1”, “field2”: “Value2”}.
Since the id is specified in the POST body, currently my outgoing body will look like this: {“field1”: “Value1”, “field2”: “Value2”, “id”: “1234”}.
I can use a key filter transformer to filter the id field from the body, but then my outgoing URL is incorrect since it can’t find the id field in the body.
So it seems currently my only options are to have the id in both the URL and the body, or to have it in neither.
So how do I keep my id field in the URL, but strip it out of the body?