0

Which request method I should use here:- I want to send some credentials in the body because of confidentiality but at the same time, I am not expecting anything in response instead I am expecting a redirect.

Deepika
  • 95
  • 1
  • 5
  • Looks like you want to do a temporary redirect, http status code 303. See [Redirections in HTTP](https://developer.mozilla.org/en-US/docs/Web/HTTP/Redirections) – marcusholmgren Feb 08 '21 at 10:28
  • Thanks @marcusholmgren for responding but I want to send credentials in body i.e POST request and expecting a GET request instead of a response. Could this be possible?. – Deepika Feb 08 '21 at 10:48
  • you can listen to the post request's response and if it was successful, you can then send the get request . – Hossein Mousavi Feb 08 '21 at 10:55
  • Thanks, @Hossein Yes this is the last option I can think but could you please look here: https://stackoverflow.com/questions/66098129/can-a-post-request-be-redirected-as-another-get-request. This is the actual scenario. Can you please comment about would that even possible? – Deepika Feb 08 '21 at 11:01
  • @Hossein I wanted to redirect from the server-side due to some reasons – Deepika Feb 08 '21 at 11:03
  • so I guess the temp redirect is what you need. you send a post request and the server will redirect you to another URL – Hossein Mousavi Feb 08 '21 at 11:09
  • can we change the request method after temporary redirect on server side? ...i.e from POST to GET – Deepika Feb 08 '21 at 11:12

0 Answers0