/** * @param method * @param httpclient * @return * @throws IOException * @throws ClientProtocolException */ private HttpResponse execute(HttpUriRequest method, HttpClient httpclient) throws IOException, ClientProtocolException { if (needAuth()) { return HttpClientUtils.executeWithBasicAuth(method, httpclient); } if (soTimeout > 0) { HttpConnectionParams.setSoTimeout(method.getParams(), soTimeout); } return httpclient.execute(method); }