About http status code 302 request redirection front-end data interaction http302

The front end of the project will uniformly process the status code returned by the back end and give a prompt that the axios interceptor needs to be fully configured

But we can't catch problems like 302 because when the status is 302, the browser will jump according to redirectUrlt

it's hard

302 indicates temporary redirection when accessing a URL and being redirected to another URL, which will be encountered when the general page jumps

The difference between him and 301 301 is permanent mobile 302 is temporary, the next time the request may be a new url

This url will be redirected to the location in the responses returned by the browser

There are many problems with 302 that can cause errors

   Using a certain plugin also results in a 302

  Session or token expiration will cause this problem

 In the end, the url I requested was wrong, which caused 302

Guess you like

Origin blog.csdn.net/weixin_60687276/article/details/127319727