title: Trying to get HttpPost to send two JSON objects to server. Passing 1 object works. 2 does not
body: <p>This is my code that works perfectly to post one object to my server.</p>
  
  <pre><code>//Creating HttpPost object
  HttpPost post_request = new HttpPost();
  //Creating BasicHttpParams
  BasicHttpParams params = new BasicHttpParams();
  //Setting parameters to params
  params.setParameter("json", j);
  //Setting params to post_request
  post_request.setParams(params);
  //setting HttpPost object URI
  post_request.setURI(website);
  //executing actual request
  HttpResponse response = client.execute(post_request);
  </code></pre>
  
  <p>What I would like to do is to pass two objects as the parameters as so:</p>
  
  <pre><code>//Creating HttpPost object
  HttpPost post_request = new HttpPost();
  //Creating BasicHttpParams
  BasicHttpParams params = new BasicHttpParams();
  //Setting parameters to params
  params.setParameter("json", j, "json2", j2);
  //Setting params to post_request
  post_request.setParams(params);
  //setting HttpPost object URI
  post_request.setURI(website);
  //executing actual request
  HttpResponse response = client.execute(post_request);
  </code></pre>
  
  <p>Of course, that does not work. I get a red line underneath <code>setParameter</code>.</p>
  
  <p>What can I do to pass through two objects in my post? I've read some varying answers like "it's not possible and I would have to import a .jar file", but I feel like there is some easy way I'm missing. Thanks in advance.</p>