Ajax's post request always reports 401, but there is nothing wrong with the interface I tested in postman. Why?

clipboard.png

clipboard.png

clipboard.png


Hello, landlord!
first of all, the status code of 401 is caused by the fact that authentication does not pass .
the reason for your problem is that Content-Type is of the wrong type and should be the way the form form is submitted. So you can change it to the following format and try

.
  

have you solved it? I also ran into

.
Menu