title: Sending JSONString within URL in doPost method, JAVA
body: <p>I have a json string, needs to be passed as a query parameter of URL.</p>
  
  <pre><code>String jsonString = "{\"name\":\"sample\"}";
  
  HTTPSClientUtils.doPost(new URL(url + "?params=" + jsonString), "", header);
  </code></pre>
  
  <p>I tried like this and got error as "Illegal characters in URL"</p>
  
  <p>Then, alternatively, I tried as,</p>
  
  <pre><code>String urlJson = URLEncoder.encode(jsonString, "UTF-8");
  </code></pre>
  
  <p>Now also it returns same error.
  Can someone guides a proper way to send json string in URL for POST?</p>