import axios from'axios'let data ={"code":"1234","name":"yyyy"};
axios.post(`${this.$url}/test/testRequest`,data).then(res=>{
console.log('res=>',res);})
Content-Type: multipart/form-data
import axios from'axios'let data =newFormData();
data.append('code','1234');
data.append('name','yyyy');
axios.post(`${this.$url}/test/testRequest`,data).then(res=>{
console.log('res=>',res);})
### Content-Type: application/x-www-form-urlencoded ```js import axios from 'axios' import qs from 'Qs' let data = {"code":"1234","name":"yyyy"}; axios.post(`${this.$url}/test/testRequest`,qs.stringify({ data })) .then(res=>{ console.log('res=>',res); }) ```