As you can see, the only problem is that I had to construct the
payload manually:
var payload = 'j_username=' + username + '&j_password=' + password;
instead of:
var payload = { j_username: username, j_password: password};
, which might be problematic when special characters are used.
If there is a better way, let me know someone :)
Regards,
Witold Szczerba
On 14 February 2012 20:54, Eric Jain <eric...@gmail.com> wrote:
> How do I post data as application/x-www-form-encoded rather than json?
>
> $http.post('/test', { foo : 1, bar : 2 });
>
> --
> You received this message because you are subscribed to the Google Groups "AngularJS" group.
> To post to this group, send email to ang...@googlegroups.com.
> To unsubscribe from this group, send email to angular+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/angular?hl=en.
>