Here is my angularjs code
$http({
method : "POST",
url : '/jobseeker',
data : {
"email" : $scope.userdata.uemail,
"firstname" : $scope.userdata.fname,
"lastname" : $scope.userdata.lname,
"password" : $scope.userdata.upassword
}
}).success(function(data) {
console.log(data);
//state.go(to verification page for job seeker
})
and here is my rest controller mapping
@RequestMapping(value = "/jobseeker", method = RequestMethod.POST)
public ResponseEntity signUp(@RequestParam("email") String email,
@RequestParam("firstname") String firstname,
@RequestParam("lastname") String lastname,
@RequestParam("password") String password) { ....}
I am getting 400 Bad request error stating that parameter email is missing
I also tried add the following headers in my code still I get the same error
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}