Postman: How to Write Files to Disk?

Sooner or later you will ask yourself the question: how can a read or write files to disk when using Postman?

Valentin Despa
APIs with Valentine

--

The quick answer to this question is: you cannot.

Latest update: February 2021

From here on, starts the answer to this question and a possible solution that will require some JavaScript skills on your side.

The Postman app is designed as an HTTP client and it more or less works like a browser: you can view a page, you can upload or download a file and that is about it. Of course, you can do the same thing with Postman but more likely you want to introduce some kind of automation to your requests and collections.

Introducing Newman

When talking about automation with Postman, it is practically impossible to get around without using Newman. This is a CLI companion tool for Postman that integrates well with CI/CD servers and it is ideal for scenarios where no human intervention is required or desired.

This tutorial assumes that you already have a good understanding of how Postman and Newman work. If this is not the case, consider looking at my Postman online course which can get you up to speed in all you need to know.

If you have never used Newman before, I would highly advise you to get an introduction to Newman (and implicitly to NodeJs and npm)…

--

--

Valentin Despa
APIs with Valentine

Software developer, educator & overlander • GitLab Hero • AWS Community Builder • Postman Supernova • Imprint: http://vdespa.com/imprint