0

For the purpose of my testing, I need to fetch .json file at pre-request script section and use it as payload for POST request using Postman, then once been fetched need to alter some data on it.

My .json looks like:

{
  "email": "test@gmail.com",
  "password": "Abc12345",
  "timezone": "Europe/Berlin"
 }

After being fetched, I need to change email address with another dynamically generated email.

I know its possible to use .json file within body -> binary section of Postman, but this is not sufficient for the use-case that I need. enter image description here

Is there any way to fetch .json file with-in pre-request script and then alter a value befere firing the request?

vlatko606
  • 909
  • 1
  • 13
  • 21
  • As per my understanding, we send files which means we have to upload them as binary. and if it is a JSON then just send it as an object (JSON.stringify). – Mahesh S Feb 06 '23 at 13:56
  • I was wondering is it possible to be fetched somehow from pre-request script? If not, then how to use this binary file into the pre-request section? This is what I am after – vlatko606 Feb 06 '23 at 13:58

0 Answers0