【发布时间】:2015-09-03 12:17:30
【问题描述】:
我的代码如下:
var response = $http({
method: 'post',
withCredentials: true,
dataType: "json",
data: JSON.stringify(payload),
headers: {
'Content-Type': 'application/json; charset=utf-8',
},
url: url
});
有效载荷如下所示: {"CASEID":3,"CASENUMBER":"ANY","TITLE":"ANY"}
后端代码:
public CL_CASE Post([FromBody]CL_CASE value)
{....
运行时显示的值为空。 如果我将标题更改为 'Content-Type': 'application/x-www-form-urlencoded' 那么我确实获得了价值,但属性等于 null/0 。我做错了什么?
谢谢
【问题讨论】: