ApacheのHttpClient 4.5.2を使用しようとしています。私はWildfly 10サーバーで動作しています。私は本当にorg.apache.http.client.fluent.Requestを使用したいと思います。コールは初めて機能します。ここでは、コードが初めて作品Proxy HttpClient 4.5.2(Request&HttpGet)は、プロキシとSSLの使用時に2番目の呼び出しで失敗します。
InputStream stream = null;
try {
Request httpGetRequest = Request.get(queryUrl);
httpGetRequest.viaProxy(new HttpHost(httpsProxyHost, httpProxyPort.intValue()));
HttpResponse response = httpGetRequest.execute().returnResponse();
stream = response.getEntity().getContent();
//Process Stream....
} catch (Exception e) {
logger.error("Nope!. Try again", e);
} finally {
try {
if (stream != null) {
stream.close();
}
} catch (Exception e) {
logger.warn("Problem closing stream!", e);
}
}
次のようになります..しかし、私は注意することが重要Connection Timeout error..
を取得し二回目:プロキシスルーつもりはないとSSL(別のURLを、使用しない場合しかし同じコード)毎回動作します。
アイデア?
ありがとうございました。
答えはありませんが、[javax.ws.rs.client.Client](http://docs.oracle.com/javaee/7/api/javax/ws/rs/client/Client .html)これを行うためのAPI? –