axios的post请求传递参数

let params = new URLSearchParams();
params.append('username', 'sertyu');
params.append('password', 'dfghjd');
axios.post('http://localhost:8080/user/addUser1', params)
.then(function (value) {
	console.log(value);
})
.catch(function (reason) {
	console.log(reason);
})

你可能感兴趣的:(#,Vue3,vue,javascript,ajax)