L Sampaio
L Sampaio

Reputation: 91

My POST postman request is being redirected to a GET

I am trying to send a POST request to an endpoint but for some reason I am being automatically redirected to a GET to the same endpoint.

What I don't understand is if I copy the cURL and send it directly in terminal I wont be redirected to the GET call.

I have tried switching off "Automatic Redirects" in the settings but it doesnt help as the call wont be accepted at all.

Upvotes: 9

Views: 6421

Answers (4)

Murat Kurbanov
Murat Kurbanov

Reputation: 837

I also have same problem. The problem was in SSL. Changed http to https it works as expected. May be it will help you. Good luck.

Upvotes: 4

I had the same problem. Pay attention to the screenshot - the POST request is sent to HTTP, but the next GET request is already redirected to HTTPS. Try sending a POST request to HTTPS. This is exactly what helped me.

Upvotes: 3

Danny Dainton
Danny Dainton

Reputation: 25881

You would need to use the Follow original HTTP Method option in the Request Settings.

Redirect with the original HTTP method instead of the default behavior of redirecting with GET.

enter image description here

Upvotes: 15

Zaur
Zaur

Reputation: 226

enter image description hereHi please check enable interceptor (Then, you can intercept the redirect response, extract what is interested, and set it as global variable or environment variable:) or delete cookie and check redirect

Upvotes: 0

Related Questions