Removing White spaces from a string for http connection
<p>I am trying to send a query url</p>

<pre><code>String url = String.format(
   "http://xxxxx/xxx/xxx&amp;message=%s",myEditBox.getText.toString());
// Create a new HttpClient and Post Header
DefaultHttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost(url);
httpclient.getCookieStore().addCookie(cooki);
try {
   ResponseHandler&lt;String&gt; responseHandler = new BasicResponseHandler();
   httpclient.getParams().setParameter("http.connection-manager.timeout", 15000);
   String response = httpclient.execute(httppost, responseHandler);
</code></pre>

<p>gives me error, <code>illegal character at query</code>. That's <code>white space</code> probably. How to deal with this issue?</p>

<p>Best Regards</p>
