Request Payload modification


Hi, We had many scripts which were allowing to modify the payload. Running fine.

Then we upgraded to the latest version 2.11.0

In this every modification of payload is not working. All per-scripts are breaking due to this.

For example,we’re modifying :
$event[‘request’][‘payload’][‘password’] in PRE SCRIPT.
The script doesn’t take this and post also shows old values from the request.

Any quick help would be highly appreciated. If its a bug, would like to know a quick fix file so that we can go and fix it.


I stumbled across the same problem. Turns out that since version 2.11, you need to modify event.request.content. I’m not sure whether you now need to modify payload AND content or only content. All my scripts were modifying only the payload and those modifications were not passed on since version 2.11

My solution: add the following line to the end of every script that modifies the payload, to copy any payload modifications to content.
event.request.content = JSON.stringify(event.request.payload);