Why is my .Net 6 API throwing a 302 on HTTP redirect rather than a 307, changing my POST to a GET?

223 Views Asked by At

I have one web API I essentially copied from another. Both have app.UseHttpsRedirection() as well as app.UseHSTS() in their Program.cs. Both have Swagger redirect working (this is a local internal test site).

However, when I use Postman to try to fetch the original token, the original Web API returns a 307 and redirects the POST, but the other one returns a 302 and redirects to GET:

POST http://webapicore-dev.calfee.com/token 307  

POST https://webapicore-dev.calfee.com/token 200

POST http://recordsapps-dev.calfee.com/token 302

GET https://recordsapps-dev.calfee.com/token 405
0

There are 0 best solutions below