Solución:
Pruébelo de la siguiente manera:
var item = {
"__metadata": { "type": "SP.Data.CaseListItem" },
"Title": "updated title"
};
$.ajax({
url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/GetByTitle('CaseList')/items(1)",
type: "POST",
contentType: "application/json;odata=verbose",
data: JSON.stringify(item),
headers: {
"Accept": "application/json;odata=verbose",
"X-RequestDigest": $("#__REQUESTDIGEST").val(),
"X-HTTP-Method": "MERGE",
"If-Match": "*"
},
success: function (data) {
console.log(data + " success in updating item");
},
error: function (data) {
console.log(data);
}
});
¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)