I had the same problem, you could solved this error finally? Thanks,
Christian On Tuesday, September 17, 2013 at 9:33:04 PM UTC+2, Bernard Choi wrote: > > I encountered a similar problem, and the following resource helped me. > > > http://victorblog.com/2012/12/20/make-angularjs-http-service-behave-like-jquery-ajax/ > > > > On Tuesday, September 17, 2013 9:19:59 PM UTC+8, Carlos Campos Coelho > wrote: >> >> We were facing the same problem here. >> >> In our scenario, we had to do two things: >> >> 1. Add the following line to the $http object: >> headers: {'Content-Type': 'application/x-www-form-urlencoded'} >> >> 2. Use POST method instead of GET >> method: 'POST' >> >> So in the end, we came up with something like this: >> >> myData = {"Email": "[email protected]", >> "Password": "123456"}; >> $http({ >> method: 'POST', >> url: 'Login', >> data: myData, >> headers: {'Content-Type': 'application/x-www-form-urlencoded'} >> }).success(function (data) { >> alert(data); >> }).error(function () { >> alert("login error"); >> }); >> >> >> On Saturday, June 8, 2013 12:54:16 PM UTC-3, Vignesh Bhaskar wrote: >>> >>> Can someone help me? I am using $http.post and posting the data as a >>> json object to my Java servlet residing in tomcat. When i parse my >>> parameters using getParameter, it returns only NULL. >>> >>> The request is successful if i use $.ajax post. I am using $http.post >>> because i need to use the $scope object in my call back >>> >> -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
