Use axios to request cross-domain and% problems of the server?

at first I used vue axios, "application/x-www-form-urlencoded; charset=UTF-8" server to return Access-Control-Allow-Origin:* but send% past unable to decode value

ajax "Content-Type": "application/json; charset=UTF-8"
Access-Control-Allow-Origin:*

vue axios "Content-Type": "application/json; charset=UTF-8" Access-Control-Allow-Origin:* ;

java tomcat

![![][3]][2]


Mar.12,2021

did not get the data


you have a cross-domain problem with application/json because the server has not configured the cross-domain to handle option requests. Let your backend configure


how the axios request header is set. Send out the code to see

.
Menu