1

hello guys i'm trying to write a restful program but i have a problem if a user uses this url : http://127.0.0.1:8000/dashboard/dsdproject/1/skills/ should redirect to another page this url work in browser but when i using in postman it returns 302 status code how can i fix it to see 200 status code and redirect to my goal page?!? i add that i try post and get request for both of them i have this condition. i become so thankful if someone know this question help me i cant find any solution with searching in google.

its my postman request

  • postman is returning correct result. It gave you 302, meaning the page has been moved. More info: https://en.wikipedia.org/wiki/HTTP_302 – ruddra Jul 23 '20 at 08:33
  • thank you for your answering. can i use postman to redirect to that page ?!?for example when i use browser i see 200 status code in my terminal how do i use postman to see a behavior like that?!? – Marzie MasumZade Jul 23 '20 at 08:36
  • Please check your 302 response, if it there is any redirection url, then call that redirect url with parameters. – ruddra Jul 23 '20 at 08:37
  • this may help you - https://stackoverflow.com/questions/56763018/is-there-a-way-to-retrieve-the-redirected-url-from-a-postman-response – SST Jul 23 '20 at 08:42
  • i use your answer and it's solving some problem for me but still i have problem ok i redirect automatically to an url but i cant redirect to an url in localhost why?!? – Marzie MasumZade Jul 23 '20 at 09:10

1 Answers1

1

i thank you so much my friends to help me understand why postman behaves like this. we can't use redirect directly in postman for using in application and sending json we can send a 200 status code to app and app sending a request to that page that we want to redirect user to that...that's it.