我的Ajax帖子请求是这样的: -
$.post("http://localhost:XXXX/api/TEST/Post", { "HtmlText": htmlDataFromEditor, "Standard": Standard, "Subject": Subject, "Chapter": Chapter, "Created": "1", "Updated": "0", "Deleted": "0" }, function (data) {
alert(data);
});
我想在此帖子请求中添加标题。
如何添加标题?
我不想使用$ .ajax()。
提前致谢。
答案 0 :(得分:0)
试试这个:
$.post("http://localhost:XXXX/api/TEST/Post",
{ "HtmlText": htmlDataFromEditor, "Standard": Standard, "Subject": Subject, "Chapter": Chapter, "Created": "1", "Updated": "0", "Deleted": "0" },
function (data) {
alert(data);
},
'html' /*add header type here*/
);