Writing responses to disk

Hi as suggested in the blog(https://blog.getpostman.com/2017/09/01/write-to-your-local-file-system-using-a-postman-collection/) it makes use of writeFileSync.
How ever in the node world there is async write. Would it be possible that using async write method can prevent intermingling of the data writes in the responses.
I have used sync write as suggested however in the test run that my product api shows some test results are mismatched.

Any guidance /clarification of the sync/async file write are appreciated.
@shamasis ,@kunagpal

K.thulsi doss

This might also be something to look into using:


It’s a small project created by @sivcan that might help with writing the response body data to a file.