Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prompting for user input in Postman

How can I ask for user input in Postman scripts?

I am using Postman 4.8.3, Chrome app. I have used environment variables in most cases, but for a particular case I need user to provide input for each run (I am not running collection. Instead want to make the individual Postman call more interactive as I am dealing with some management APIs). I want to insert a code like:

prompt("Enter resource id","#id");

in the Pre-request Script. However, when I do so, Postman ignores it and moves ahead. Please help.

like image 218
TechiRik Avatar asked Nov 19 '16 20:11

TechiRik


1 Answers

As stated by another, Chrome extensions reportedly doesn't allow prompt. BUT there are now native versions of Postman (Windows, Mac, Linux) and according to this nearly four year old feature request, they are working on this and will post to the request when the ability to prompt is in the Canary version.

like image 162
Kevin Dorff Avatar answered Sep 21 '22 12:09

Kevin Dorff