いっぱいではありません。 http://android.forum-example.org/?a=1 & B = 2 & C = 3HttpPost URIは、私がリンクから<strong>JSON</strong>情報を取得したい
しかし、Log.vは、の後にそれを伝えます。request.setEntity(新しいUrlEncodedFormEntity(qparams)); 私のURIは:http://android.forum-example.org/?
私の間違いはどこですか?
コード:
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(); }
11-06 17:21:03.758:V/URI:(13235):http://android.forum-example.org/? – Sviatoslav