title: How to perform POST request involving JSONObject in java-jersey?
body: <p>I have the following code to create a JSON object:   </p>
  
  <pre><code>Client client = ClientBuilder.newClient();
  
  //response is the value of some GET request I performed before
  JSONObject root=new JSONObject(response.readEntity(String.class));  
  
  //url is assigned to URL to which I wanted to POST.
  WebTarget target2=client.target(url);
  
  Response response2=target.request(MediaType.APPLICATION_JSON_TYPE);
  response2.post(*what goes here*);
  </code></pre>
  
  <p>What do I need to put inside that last <code>post</code>?</p>