java.lang.IllegalStateException: Target host must not be null, or set in parameters
<p>Ulr:</p>

<pre><code>http://23.23.82.251:9116/solr/db/select?q=*:*+_val_:%22geodist%28%29%22&amp;fq=(ProviderType:10)&amp;rows=100&amp;wt=json&amp;indent=true&amp;fl=ProviderID,ProviderType,ProviderName,ProviderAddress,CityAreaID,CityAreaName,City,State,Latlong,score&amp;fq={!geofilt}&amp;sfield=Latlong&amp;pt=20.296059,85.82454&amp;d=5&amp;sort=geodist()%20asc
</code></pre>

<p>When i am try to use this url in android with post request i am getting following error.</p>

<pre><code>10-22 13:54:49.946: E/SearchResult(6659): Exception Name = java.lang.IllegalArgumentException
</code></pre>

<p>I was used URLEncoder.encode() but still i am getting same error. can any suggest where i am writing wrong. below code i am using</p>

<pre><code>            HttpParams httpParameters = new BasicHttpParams();
            // Set the timeout in milliseconds until a connection is established.
            // The default value is zero, that means the timeout is not used. 
            int timeoutConnection = 10000;

            HttpConnectionParams.setConnectionTimeout(httpParameters, timeoutConnection);

            // Set the default socket timeout (SO_TIMEOUT) 
            // in milliseconds which is the timeout for waiting for data.
            int timeoutSocket = 15000;
            HttpConnectionParams.setSoTimeout(httpParameters, timeoutSocket);               
            httpclient = new DefaultHttpClient(httpParameters);             

            HttpPost httppost = new HttpPost(url here);
            JSONObject json = new JSONObject();
            // Execute HTTP Post Request
            HttpResponse response = httpclient.execute(httppost);
            HttpEntity httpEntity = response.getEntity();
            InputStream instream = httpEntity.getContent();
            String result= Utilities.convertStreamToString(instream);

            json=new JSONObject(result);
</code></pre>
