title: How to submit data with Jersey client POST method
body: <p>I am new to Jersey. I need to implement a Jersey client to submit data with POST method.
  The curl command is:</p>
  
  <pre><code>curl -d '{"switch": "00:00:00:00:00:00:00:01", "name":"flow-mod-1", "priority":"32768", "ingress-port":"1","active":"true", "actions":"output=2"}' http://localhost:8080/wm/staticflowentrypusher/json
  </code></pre>
  
  <p>So I am trying to figure out how to use Jersey client to implement the above curl command.</p>
  
  <p>So far I have done:</p>
  
  <pre><code>public class FLClient {
  
  private static Client client;
  private static WebResource webResource;
  private static String baseuri = "http://localhost:8080/wm/staticflowentrypusher/json";
  private static ClientResponse response;
  private static String output = null;
  
  public static void main(String[] args) {
      try {
  
          client = Client.create();
  
          webResource = client.resource(baseuri);
  
                      // implement POST data 
  
      } catch (Exception e) {
          e.printStackTrace();
      }
  }
  
  }
  </code></pre>
  
  <p>Can someone help me with it?</p>