title: Incorrect syntax.. probably missing one minor detail
body: <p>Sending an http request form angular to spring and I'm getting the syntax is incorrect response. Whats weird is I'm not doing anything special and this same formula is working in 100 other places.. any help is much appreciated </p>
  
  <p>"NetworkError: 400 Bad Request - <a href="http://localhost:8080/accounts/1/groups/GroupedDisplay" rel="nofollow">http://localhost:8080/accounts/1/groups/GroupedDisplay</a>"</p>
  
  <p>The request sent by the client was syntactically incorrect.</p>
  
  <p>Java</p>
  
  <pre><code>@RequestMapping(value = "/accounts/{accountId}/groups/{groupName}", method = RequestMethod.POST)
  public JSONObject createGroup(@RequestBody Display display, @PathVariable("accountId") Long accountId, @PathVariable("groupName") String groupName) {
      return JsonResponse.generateResponse("display", groupService.createGroup(accountId, groupName, display), null);
  }
  </code></pre>
  
  <p>Angular</p>
  
  <pre><code>function getUrl(suffix) {
      if (suffix) 
          return 'http://localhost:8080/accounts/'+getAccountId()+'/groups/'+suffix;
      else
          return 'http://localhost:8080/accounts/'+getAccountId()+'/groups';
  }
  
  ...
  
  createGroup: function(groupName, display) {
          var deferred = $q.defer();
  
          $http.post(getUrl(groupName), display)
              .success(function (response) {
                  var display = response.data.display;
                  deferred.resolve(new Display(display));
              })
              .error(function(response) {
                  deferred.reject('Failed to retrieve display: ' + response.message);
              });
  
          return deferred.promise;    
      },
  </code></pre>