您的位置:首页 > 其它

WCF REST 工作总结

2014-05-28 11:59 176 查看
首先引用System.ServiceModel;System.ServiceModel;System.ServiceModel.Activation;命名空间

$(function () {
$.ajax({
type: "POST",
contentType: "application/json",
data: '{ "UserName": "111","Password":"111" }', //比如
url: "http://localhost:9800/API/Login",
dataType: 'json',
error: function (x, e) {
console.log(x);
},
success: function (response) {
console.log(response);
}
});

});


View Code
注意method="动作",动作有POST,GET等,必须大写。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: