I wanna send user's email to check duplicate
This is my Back Controller
@RequestMapping(value = "/api/v1/public/checkDuplicate", method = RequestMethod.POST)
public ResponseEntity<Object> getCnt(
HttpServletRequest request,
HttpServletResponse response,
@RequestParam(value="usrEmail", required=false) String usrEmail){
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
}
And this is my Front Controller
$scope.user.usrEmail = $scope.usrEmail;
var req = {
method: 'POST',
url: './api/v1/public/checkDuplicate',
dataType: 'json',
headers: {
'Content-Type': 'application/json; charset=utf-8'
},
data: angular.toJson($scope.usrEmail)
};
And this is my View
<input type="email" class="form-control" name="usr_Email"
ng-model="usrEmail" ng-required="true"
ng-keypress="checkDuplicate()">
When I checked using 'console.log', Front Controller can get user's email properly. But in Back Controller, RequestParam has nothing, just NULL without Error Code except 'NullPointerException'.
It isn't communication error I think. Are there something I missed? Thanks!