Invalid axios setting header

clipboard.png

clipboard.png

recently, when using axios, I found that the request header is set according to the document ~ but the corresponding setting cannot be seen in the browser console (for example, the content-type, of the request header is set here, but the request header does not show this configuration in network, and the x-requested-with set in the code takes effect). What is the reason for this?

Oct.25,2021

because this is a get request, you cannot set Content-Type
by default. You can take a look at the community discussion
reference link

.
Menu