小程序:
wx.request({
url: 'http://localhost:63026/api/News/Uploaddata',
method: 'post',
data: "123",
header: {
"Content-Type": "application/x-www-form-urlencoded"
},
success: function (res) {
console.log(res)
}
})
后台:
[HttpPost]
public string Uploaddata([FromBody]object value)
{
string name = HttpContext.Current.Request["data"];
return "success2";
}
呵呵,自己好好看看文档吧......
整天冒充大佬的人不知道怎么称呼,,,,