I'm trying to integrate Newman(postman CLI tool) in my app, and I want to run it first on the localhost on a specific port, and change it in accordance later on. Any suggestions on how to do that with the CLI?
After digging and reading a ton I've figured out the best and simplest way to do so: just setting up the following environment variable "HTTP_PROXY" to whatever and then using it with newman:
set HTTP_PROXY=127.0.0.1:58833
newman run demo.postman_collection.json --env-var HTTP_PROXY --insecure
Now I can listen to the above port and see all of newman's requests being sent.
found my solution here: https://github.com/postmanlabs/postman-request/blob/master/README.md#controlling-proxy-behaviour-using-environment-variables