I want to get json info from the link: http://android.forum-example.org/?a=1&b=2&c=3
but Log.v tells me that after request.setEntity(new UrlEncodedFormEntity(qparams)); my URI is: http://android.forum-example.org/?
Where is my mistake?
code:
try {
HttpClient httpClient = new DefaultHttpClient();
HttpPost request = new HttpPost("http://android.forum-example.org/?");
List<NameValuePair> qparams = new ArrayList<NameValuePair>(3);
qparams.add(new BasicNameValuePair("a", "1"));
qparams.add(new BasicNameValuePair("b", "2"));
qparams.add(new BasicNameValuePair("c", "3"));
request.setEntity(new UrlEncodedFormEntity(qparams));
Log.v("URI:", request.getURI().toString());
HttpResponse response = httpClient.execute(request);
} catch (IOException e) { e.printStackTrace(); }