How can I serialize an object without using the $.param
jquery?
I want the object below:
var user = {username: 'ronald.araujo', password: '123456',};
to have the following output:
username=ronald.araujo&password=123456
Any suggestions? Remembering that I would do this using Angularjs or pure Javascript.
EDIT:
I am using the verb "save" ($resource) the angularjs. How could I set the header "application / x-www-form-urlencoded" and serialize?