@@ -420,26 +420,19 @@ public CloseableHttpClient getHttpclient() {
420
420
}
421
421
422
422
private void initHttpClient () {
423
- ApacheHttpClientBuilder apacheHttpClientBuilder = this .wxMpConfigStorage
424
- .getApacheHttpClientBuilder ();
423
+ WxMpConfigStorage configStorage = this .getWxMpConfigStorage ();
424
+ ApacheHttpClientBuilder apacheHttpClientBuilder = configStorage .getApacheHttpClientBuilder ();
425
425
if (null == apacheHttpClientBuilder ) {
426
426
apacheHttpClientBuilder = DefaultApacheHttpClientBuilder .get ();
427
427
}
428
428
429
- apacheHttpClientBuilder .httpProxyHost (this . getWxMpConfigStorage () .getHttpProxyHost ())
430
- .httpProxyPort (this . getWxMpConfigStorage () .getHttpProxyPort ())
431
- .httpProxyUsername (this . getWxMpConfigStorage () .getHttpProxyUsername ())
432
- .httpProxyPassword (this . getWxMpConfigStorage () .getHttpProxyPassword ());
429
+ apacheHttpClientBuilder .httpProxyHost (configStorage .getHttpProxyHost ())
430
+ .httpProxyPort (configStorage .getHttpProxyPort ())
431
+ .httpProxyUsername (configStorage .getHttpProxyUsername ())
432
+ .httpProxyPassword (configStorage .getHttpProxyPassword ());
433
433
434
- // if (this.getWxMpConfigStorage().getSSLContext() != null) {
435
- // SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(
436
- // this.getWxMpConfigStorage().getSSLContext(), new String[] { "TLSv1" }, null,
437
- // new DefaultHostnameVerifier());
438
- // apacheHttpClientBuilder.sslConnectionSocketFactory(sslsf);
439
- // }
440
-
441
- if (this .getWxMpConfigStorage ().getHttpProxyHost () != null && this .getWxMpConfigStorage ().getHttpProxyPort () > 0 ) {
442
- this .httpProxy = new HttpHost (this .getWxMpConfigStorage ().getHttpProxyHost (), this .getWxMpConfigStorage ().getHttpProxyPort ());
434
+ if (configStorage .getHttpProxyHost () != null && configStorage .getHttpProxyPort () > 0 ) {
435
+ this .httpProxy = new HttpHost (configStorage .getHttpProxyHost (), configStorage .getHttpProxyPort ());
443
436
}
444
437
445
438
this .httpClient = apacheHttpClientBuilder .build ();
0 commit comments