Request payload
$.ajax({
type:'POST',
url:'/hq/friend/regInfo',
contentType: "application/json;charset=utf-8",
data:JSON.stringify({
friendName:friendName,
friendPhone:phone,
friendAddress:friendAddress,
friendBless:bless,
userId:userId,
aid:aid
}),
dataType:'json',
success:function(res){
console.log(res)
}
});
form-data
$.ajax({
type:'POST',
url:'/hq/friend/regInfo',
data:{
friendName:friendName,
friendPhone:phone,
friendAddress:friendAddress,
friendBless:bless,
userId:userId,
aid:aid
},
dataType:'json',
success:function(res){
console.log(res)
}
});