title: Unable to invoke request (REST call)
body: <p>I'm currently using Jersey/Jackson in order to make a REST call from client to server. </p>
  
  <p><strong>Client side:</strong></p>
  
  <pre><code>ResteasyClient client = new ResteasyClientBuilder().build();
  ResteasyWebTarget target = client.target("http://localhost:8080/TrustBasedRecommendation/restservice/adduser");     
  Response responseTo = target.request().post(Entity.entity(json, MediaType.TEXT_HTML));
  if (responseTo.getStatus() != 200) {
  throw new Exception("Failed : HTTP error code : " + responseTo.getStatus() +" "+ responseTo.readEntity(String.class) );
  </code></pre>
  
  <p><strong>SERVER SIDE</strong> - Just a test to print my String</p>
  
  <pre><code>@POST
  @Path("/adduser")
  @Consumes(MediaType.TEXT_HTML)
  public Response addUser(String user)
  {
      System.out.println("Inside add user "+user);
      String failedMessage = "failed to add user";
      String successMessage = "user successfully added";
  </code></pre>
  
  <p><strong>I'm getting the following exception:</strong></p>
  
  <pre><code>javax.ws.rs.ProcessingException: Unable to invoke request
  
  Caused by: javax.ws.rs.ProcessingException: could not find writer for content-type text/html type: java.lang.String at org.jboss.resteasy.core.interception.ClientWriterInterceptorContext.throwWriterNotFoundException(ClientWriterInterceptorContext.java:40)
  </code></pre>
  
  <p>I'm trying to send a "String" (JSON) from my client to server.</p>
  
  <p>Please kindly help.</p>
  
  <ul>
  <li>R</li>
  </ul>