$.ajax

示例:

提交json数据到asp.net core api

$.ajax({
    type: "POST",
    url: "/api/xxxxSetApi/add",
    contentType: "application/json;charset=utf-8",
    // 注意这里,如果提交的json数据,这里必须使用JSON.stringify包裹
    data: JSON.stringify({isRecommend: false, title: title, categoryId: categoryId }),
    dataType: "json",
    success: function (message) {
    },
    error: function (message) {
    }
});