目前我这样使用axios:
import axios from 'axios'
axios.get(apiObjUrl,
{
headers: {
'Content-type': 'application/x-www-form-urlencoded',
}
})
.then(({data}) => {
我该如何设置全局 axios 标头呢?(我需要设置本地化标头以在所有请求中使用)
config
中,您可以设置请求头。