Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to retrieve the redirected url from a Postman response?

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.

like image 350
user2865020 Avatar asked Jun 25 '19 22:06

user2865020


1 Answers

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:

enter image description here

Then, you can intercept the redirect response, extract what is interested, and set it as global variable or environment variable:

enter image description here

Finally, this variable can be used in "next request", as query string in GET request, or as part of POST request's body:

enter image description here

enter image description here

like image 147
shaochuancs Avatar answered Nov 19 '22 20:11

shaochuancs