我正在尝试使用$.ajax提交数据,但是我收到了400错误的失败消息。以下是代码:
我正在尝试使用$.ajax提交数据,但是我收到了400错误的失败消息。以下是代码:
$.ajax({
url: "http://192.168.1.9:150/Service.svc/usrregistration",
type: "POST",
// data: '{"Firstname":' + Firstname + ',"LastName:"'+LastName+'}',
data: '{"Firstname":"rose"}',
contentType: "application/json; charset=utf-8",
dataType: "json",
processdata: true,
success: function (msg) {
alert(msg);
alert('Registerd successfully');
},
error: function (msg) {
alert('Faild'+msg.status);
}
});