title: How to send a post request with multiple parameters
body: <p>I have a project where we call a GET method from Java Script : the method called is below :</p>
  
  <pre><code>public
  @ResponseBody
  Map run( @RequestParam Map map, HttpServletRequest request,   HttpServletResponse response) throws Exception {
  
  }
  </code></pre>
  
  <p>Now I am writing a Micro service to do the work which is done inside the above method . And the requirement is this method will call the micro-service .The only thing I am stuck with is passing the  (HttpServletRequest request,   HttpServletResponse response)  to the method in micro-service I am calling as they have some data in there which will be used. </p>
  
  <p>My method definition in micro-service looks like :</p>
  
  <pre><code>@POST
  @Path("/myPostCall")
  public String myPostCall(Map map,HttpServletRequest request,       HttpServletResponse response) throws Exception{
  }
  </code></pre>
  
  <p>Now I am trying to call this by </p>
  
  <pre><code> RestTemplate abc = new RestTemplate();
  abc.postForObject("http://localhost:8008/report/run", report1, String.class);
  </code></pre>
  
  <p>It gives me 422 error . But If I remove the request,response parameters in micro-service method . it runs good . But I need them too . Because they have data in it . Is there something out of my understanding .</p>