I am using DevOps restapi to get some information.
The POST method is working fine for me.
I want to update the status of my work item. For that I need to use the PATCH method. Which is not working, and not giving any kind of error.
function postApiData(ApiUrl, responseBody) {
var res = '';
try {
$.ajax({
type: 'POST',
async: false,
url: ApiUrl,
contentType: 'application/json',
data: JSON.stringify(responseBody),
cache: false,
dataType: 'json',
beforeSend: function (xhr) {
xhr.setRequestHeader("Authorization", "Basic " + btoa("" + ":" + _token));
},
}).done(function (data) {
res = data;
}).fail(function (e) {
});
} catch (error) {
var x = error;
throw x;
}
return res;
};
For Patch method, I am modifying a few things. but it is not giving any error not updating my work item. I have also checked my token access. I have full access.
type: 'PATCH',
contentType: 'application/json-patch+json',