问题
I'm trying to submit a form in Postman which then redirects to another url. The redirected url query string contains some information that I want to use in my next call. Is this even possible and if yes, how?
I haven't been able to find anything in Postman docs regarding this.
回答1:
Yes, you can retrieve the redirected URL, extract interested information, and use it in the next request in Postman.
First, to retrieve the redirected URL, the "Automatically follow redirects" option in Postman should be turned off:
Then, you can intercept the redirect response, extract what is interested, and set it as global variable or environment variable:
Finally, this variable can be used in "next request", as query string in GET request, or as part of POST request's body:
来源:https://stackoverflow.com/questions/56763018/is-there-a-way-to-retrieve-the-redirected-url-from-a-postman-response