How can I want to use angular $resource to send a post request which has request parameters encoded in the request body rather than being part of url.
$resource("/data").save({'p':'foo'})
...
On the server side, the output of request.body is
{"p":"foo"}
Apparently the parameter is encoded as JSON rather than being encoded in the body of the request as
p=foo
How can I correctly post/encode key value pairs for post requests using $resource.
I tried
$resource("/data",{'p':'foo'}).save ...
This encodes the parameter in url although I used save which implies post request. I want to only have the parameters encoded in body of the request and the url remain the same (/data).
Thanks,
Ali