title: Http Client using JAXRS Client API (POST Request) in Websphere Liberty Profile
body: <p>I need to create an Http Client to test a REST web service with JAXRS Client API (lib: javax.ws.rs.client.*) provided by WLP. I'll have to send a String Request (JSON message) using POST method and Receive a String Response (JSON message). I'll be grateful if someone has a similar Java Code (Class) and the necessary imports to do this task.</p>
  
  <p>PS : I started coding the Java Class but I didn't know how to get the response: </p>
  
  <pre><code>Client client = ClientBuilder.newClient(); 
  WebTarget myResource = client.target("http://example.com/webapi"); 
  ....
  </code></pre>
  
  <p>I'm using: </p>
  
  <pre><code>Websphere Liberty profile 16.0.0.2, 
  jaxrs-2.0 [1.0.0] 
  jaxrsClient-2.0 [1.0.0]
  IDE : RDz
  </code></pre>