I have an angular service that looks like this. Here i am making a POST request.
.factory("Apples", function ($resource, HOST) {
return $resource(
HOST + "/apples",
{},
{
create: {
method: 'POST',
params: {
tree_id: '@treeId',
name: '@name',
color: '@color'
}
}
}
);
})
The problem is that the above service makes a POST request and sends the params
data as form data but also appends the params
data to the url as query string. Can i avoid that?