I am attempting to utilize the HTTP PUT method to send data to the server, which is expecting form parameters in the PUT method.
var deferred = $q.defer();
$http({
method: 'PUT',
url: 'http.hello.com/rest/sample/' + fileName,
data: {status: status}
}).success(function(data) {
deferred.resolve(data);
}).error(function() {
deferred.reject(data);
});
return deferred.promise;
However, the server continues to return a custom error indicating missing data. How can I successfully pass the data in the PUT method? I also attempted $.param()
, but it converts the data into a string, which is not correct.