title: Why do I get a 400 error when sending multiple parameters in post? Angular + Spring Boot
body: <p>I'm sending a localdatetime, and a number to my restcontroller from angular. This is the only one I get errors with, no matter what I do. I logged the variable values, in case they're in a wrong format. The localdatetime was in yyyy-MM-ddThh:mm format. My angular method call:</p>
  <pre><code>updateDogFeeding(dogid,data)
      {
        return this.http.post(environment.rooturl + &quot;/api/profile/animals/feeddog&quot;,{dogid,data},{observe:'response', withCredentials:true,
        headers: new HttpHeaders({'Content-Type':'application/json'})})
      }
  </code></pre>
  <p>I tried sending the parameters in an array, or an array of the elements using JSON.stringify(), in HttpParams, nothing worked. I checked te error message from spring, and got this:</p>
  <p>Could not resolve parameter [0] in public com.example.vizsga_kedvenc_felugyelo.model.Dog com.example.vizsga_kedvenc_felugyelo.controll.DogController.feedDog(java.lang.Integer,java.time.LocalDateTime): JSON parse error: Cannot deserialize value of type <code>java.lang.Integer</code> from Object value (token <code>JsonToken.START_OBJECT</code>); nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type <code>java.lang.Integer</code> from Object value (token <code>JsonToken.START_OBJECT</code>)
  at [Source: (org.springframework.util.StreamUtils$NonClosingInputStream); line: 1, column: 1]</p>
  <p>what could be the possible cause?</p>
  <p>My restcontroller:</p>
  <pre><code>@PostMapping(value = &quot;api/profile/animals/feeddog&quot;)
      public Dog feedDog(@RequestBody Integer dogID, @RequestBody LocalDateTime timestamp)
      {
          System.out.println(&quot;Got called&quot;); //Isn't printed on the console
          return dogService.feedDog(dogID,timestamp);
      }
  </code></pre>