How can I save API response, that I get in Postman, to a Json file or CSV file?
问题:
回答1:
There are 2 ways of saving the response to a file:
- Click on the small down arrow besides the "Send" button, this will show the "Send and Download" button. Click on it and postman will ask you where to save the response, when the request is done.
- There is a "Download" button in the response section of the window.
回答2:
For Future Visitors:
You can visit this collection and use it: https://documenter.getpostman.com/view/3407886/RWgp1fB5
On sending a request, the response is saved to your file system via a local server. (Already included as a GitHub project along with instructions to use it in the collection project^)
You can send multiple requests or using the collection runner - you can run a collection or a folder. All responses will be saved after each request being sent out.
You can even store extra meta-data or maybe your test counts, variable names, variable values, URL, basically anything/everything.
回答3:
At the right top corner of postman, you can see Examples(0) drop down. Tapping that will make this request and response to be saved as a example for future reference.
You can see I have saved a response as a example. That's all. This will be helpful for those who want to save the response in postman itself other than like downloading like a json or csv as mentioned in the question.