The problem is that you're setting the wrong HTTP header to accept JSON as a response. The header you should set is Accept:
axios.get('my/url', {
headers: {
'Content-Type': 'application/json',
Accept: 'application/json'
}
})
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.