Axios Global Intercept Custom Settings request header?

axios interception was used in the project to add token, to all request headers. Now there is a request that does not need to carry token,. How to delete this custom token request header

clipboard.png

Jan.08,2022

create two instances. One is set token, and the other is not set. Call


backend according to the situation. If you must delete it, you can decide whether to add token or not according to the address of the interface where you add token.

Menu