Is it possible to send a PATCH request with a complex object in the request body? The following works fine but it sends the object as url parameters not in the request body..
//region - - - - - - - - - - - - - - - update with PATCH
patch: function(url, obj, funcSuccess){
// server call
var resP = resource(appConfigSvc.apiBaseUrl + url, obj, {
'update': {
method:'PATCH',
headers: {'Content-Type': 'application/json' }
}
});
var defer = q.defer();
resP.update(
function(data) {
defer.resolve(data);
if(funcSuccess){
funcSuccess(data);
}
},
function(response) {
//responseHandlerSvc.handleResponse(response);
defer.reject(response);
});
return defer.promise;
},
//endregion
WebApi doesn't have a problem accepting patch request body. Postman also allows sending patch requests with body. The only problem is Angular $resource.