Write to local file system using a postman collection

There are situations when you want to write the API response on local file system. So here I am explaining how to do that. Basically there are two ways to do it. One is by using node js scrip and another way to start a local server which accepts postman requests. Here I am explaining first method only.

  1. Ensure that you have node and npm installed.
  2. Install newman with: npm install newman.
  3. Create a file with the following contents:

Here is another example:

Leave a Reply

Your email address will not be published. Required fields are marked *