Clean request body

Hi Apigee Community,

I want to make sure that only a select number of fields from the request body are sent to the target server. I wanted a solution that is both light and easy to maintain, preferably with the allowed fields definition centralized on only one location.

Example:

Allowed fields = [name, surname, date_of_birth]

request.content = {
	name,
	surname,
	age
}

would turn into:

request.content = {
	name,
	surname
}

What are the best solutions for this?

Thank you in advance.

0 2 180
2 REPLIES 2

(I believe you have posted this multiple times, and this query has already been responded to in

https://community.apigee.com/questions/86497/clean-request-body-1.html and https://community.apigee.com/questions/86495/clean-request-body.html )

Don't know what happened, I was getting an error creating the question but apparently it was creating them anyway.

Thank you