title: dojo ajax request to spring mvc,getting http 400
body: <p>before starting let me say that I am new to dojo and this is my first project in dojo:</p>
  
  <p>when I am trying to send json data from rest client (some chrome ext) it working for me,I mean to say that my spring mvc part is working, but when i am trying to send the same json from dojo code I am getting http 400 exception</p>
  
  <p>my dojo code:</p>
  
  <pre><code>postCreate : function() {
              this.inherited(arguments);
              var form = dom.byId("contactSubmit");
              on(form, "click", function(evt) {
                  var box0 = registry.byId("inputEmail");
                  var box1 = registry.byId("inputName");
                  var box3 = registry.byId("message");
  
                  alert("values are: " + box0.get("value"));
  
                  jsonData = {"email":"some@gmail.com","inputName":"some name","message":"some msg"};
  
                  request.post("/pool/conta", {
                      data: jsonData,
                      handleAs: "json",
                      headers: {
                           "Content-Type": "application/json;charset=utf-8",
                           "Accept": "application/json"
                      }
                  }).then(function(text){
                      alert("values are send"+text);
                  });
  
              });
  
          }
  </code></pre>
  
  <p>the jason data that I am sending from rest client is which is working:</p>
  
  <pre><code>{"email":"some@gmail.com","inputName":"some name","message":"some msg"}
  </code></pre>
  
  <p>my spring mvc method is below:</p>
  
  <pre><code>@RequestMapping(value="/conta", method = RequestMethod.POST)
      public @ResponseBody Contact getShopInJSON(@RequestBody Contact contact2) {
  
          Contact contact = new Contact();
          contact.setEmail("pro@gmail.com");
          contact.setInputName("pro");
          contact.setMessage("msg");
  
          System.out.println("***********************"+contact2.getEmail());
  
          return contact;
  
      }
  </code></pre>
  
  <p>pool is name of application</p>