title: getting 400 Bad request with Spring with rest
body: <p>I'm trying to configure a small aplication based on extjs asfrontend and Spring as backend. So to communicate with the server from extjs we need to configure proxy writer at store. My proxy configuration looks as follows:</p>
  
  <pre class="lang-js prettyprint-override"><code>proxy : {
  
      type: 'rest',
  
      reader: {
          type: 'json',
          idProperty: 'id',
  
          root: 'data',
          totalProperty: 'total',
          successProperty: 'success',
          messageProperty: 'message'
      },
  
      writer: {
          type: 'json',
          allowSingle: true,
          writeAllFields: true,
          root: 'data'
      },
  
      api: {
          read:       'countries',
          create:     'country/add',
          update:     'country/update',
          destroy:    'country/delete'
      }
  }
  </code></pre>
  
  <p>And here is the @RequestMapping in a Spring Controller:</p>
  
  <pre class="lang-java prettyprint-override"><code>@ResponseStatus(value = HttpStatus.OK)
  @RequestMapping(value = COUNTRY_PATH + DELETE_PATH + SLASH + DELETE_ID_PARAM, method = RequestMethod.DELETE)
  public void delete(@PathVariable(DELETE_ID_PARAM) Integer deleteId, @RequestParam Object data)  {
      System.out.println(data.toString());
      countryService.deleteCountry(deleteId);
  }
  </code></pre>
  
  <p>Tomcat answers everytime "400 Bad request" with description "The request sent by the client was syntactically incorrect."</p>
  
  <p>So, but if I change proxy type to ajax and requestMapping to getting POST requests everything works fine.</p>