title: Pass a sentence to a webservice URL
body: <p>I have a webservice URL in which I have to pass a value having spaces</p>
  
  <p>but webservice is terming it as illegal</p>
  
  <pre><code> String path = java.net.URLDecoder.decode((CommonConstants.END_POINT_URL.concat(CommonConstants.DELETE_APPOINTMENT_REASON).replace("{id}", appointmentID).replace("{reason}", reason)),"UTF-8");
              WebTarget target = client.target(path);
              System.out.println(target);
  </code></pre>
  
  <p>targets gets printed as :</p>
  
  <pre><code>JerseyWebTarget { http://abc-def/SchServices/api/appointment/51574e11-b794-e411-824b-1cc1de6ebf5a?reason=Test Appointment Reason }
  </code></pre>
  
  <p>Spaces between test and appointment is not permitting it to hit webservice. URL encode is also not working....because it encodes complete thing...Please suggest</p>