有没有更好的方法同时发送数千个 http GET 请求?我的代码一个接一个地发送请求。看过其他答案,但无法弄清楚。谢谢。
for (int j=0; j<4; j++) {
DefaultHttpClient httpclient = new DefaultHttpClient();
CookieStore cookieStore = httpclient.getCookieStore();
HttpGet httpget = new HttpGet("");
try {
HttpResponse response = httpclient.execute(httpget);
List<Cookie> cookies = cookieStore.getCookies();
} catch (Exception e) {}
httpclient.getConnectionManager().shutdown();
}