I have to 'PUT' some json data to a server. The below code is throwing an error
$rootScope.request.data = {"name": "John", "surname":"Doe"}
var uri = //some REST API
var action = $http({
method: 'PUT',
url: uri,
data: $rootScope.request.data
});
The error thrown is:
Flow not found for resource: Resource{displayName='null', uri='/signup'} (org.mule.module.apikit.exception.ApikitRuntimeException). Message payload is of type: NullPayload
But when I do this, it works
$rootScope.request.data = {"name": "John", "surname":"Doe"}
var uri = //some REST API
var action = $http.put(uri, $rootScope.request.data);
The 'action' is then pushed in an array and the requested are fired using a $q.all. The success and error is handled in the $q
Was wondering what is the difference between them? Have I missed something in my first request?