You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am using pm.request.body.update() method in my pre-request script to modify the request body.
It is working fine in Postman but fails when using Newman (it doesn't modify the request).
Recently, in the Postman version 8.3.0 the functionality to mutate the request body in the pre-request script was added (postmanlabs/postman-app-support#4808).
My doubt is -
Whether this functionality is applicable to Newman currently and I'm missing something
or if it is currently not there and hopefully would be available at a later date.
Version and environment information:
Newman Version (can be found via newman -v): 5.2.2
OS details (type, version, and architecture): Windows 10, 64 Bit
Are you using Newman as a library, or via the CLI? Using it via CLI
Expected behaviour: The request should be modified when the pre-request script is executed. And the output should be similar to when the collection runs in Postman
Command / script used to run Newman: newman run Newmanissue.postman_collection --insecure
Hi!
I'm using newman version 5.3.2 and apparently it is not possible to use pm.request.body.update()IF your body is set as none in postman.
This is the error I obtain
I was able to fix it by using the raw option (which then turns body into an empty string) - can this be fixed as well?
Hi! I'm using newman version 5.3.2 and apparently it is not possible to use pm.request.body.update()IF your body is set as none in postman. This is the error I obtain I was able to fix it by using the raw option (which then turns body into an empty string) - can this be fixed as well?
Hi,
I am using
pm.request.body.update()
method in my pre-request script to modify the request body.It is working fine in Postman but fails when using Newman (it doesn't modify the request).
Recently, in the Postman version 8.3.0 the functionality to mutate the request body in the pre-request script was added (postmanlabs/postman-app-support#4808).
My doubt is -
Version and environment information:
Newman Version (can be found via
newman -v
): 5.2.2OS details (type, version, and architecture): Windows 10, 64 Bit
Are you using Newman as a library, or via the CLI? Using it via CLI
Expected behaviour: The request should be modified when the pre-request script is executed. And the output should be similar to when the collection runs in Postman
Command / script used to run Newman:
newman run Newmanissue.postman_collection --insecure
Sample collection, and auxiliary files (minus the sensitive details): https://www.postman.com/collections/27b5ee14bcb5c3d293c8
Screenshots (if applicable):
When run using Postman -
When run using Newman
Steps to reproduce the problem:
The text was updated successfully, but these errors were encountered: