Closed airios closed 8 years ago
@airios
We'll add an option for this in the next release. For now, you can edit the Newman module. In your node_modules directory (wherever you're running Newman from), edit src/runners/RequestRunner.js
After line 232, add RequestOptions.followRedirect = false;
This works fine but for CI server purposes, it doesn't. :cry: I'll just modify our acceptance for now, and check on the next release.
+1 for this feature. It would be great to be able to configure follow redirects in the options.
This was fixed in https://github.com/postmanlabs/newman/commit/525349971b2061ddbb78cafa2650c3bbf4c042fc. You can now use the -R
command line flag to avoid redirects.
Feel free to re-open this issue in case anything is amiss.
Awesome thanks!
Was this removed in recent releases? @abhijitkane @czardoz
@airios, no, it wasn't removed. Are you having problems with this?
@airios, @czardoz: It does seem as if -R
was removed, but --ignore-redirects
works.
Please, i need help for a question about follow redirect url in newman.
I Have a request in postman working generate authentication code in header, but not generate authentication code in newman.
My API request returns a
302
along with aLocation
header. I'm running tests to verify this, but Newman is following the redirect. Is there a way to prevent this, so I can run these tests accordingly?Disclaimer: It's entirely possible I missed something in the docs.