mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-10-15 18:55:13 +08:00
#370 WxMpServiceOkHttpImpl改用httpProxy
This commit is contained in:
@@ -67,8 +67,15 @@ public class WxCpServiceOkHttpImpl extends WxCpServiceAbstractImpl<OkHttpClient,
|
||||
@Override
|
||||
public void initHttp() {
|
||||
this.log.debug("WxCpServiceOkHttpImpl initHttp");
|
||||
OkHttpClient.Builder clientBuilder = new OkHttpClient.Builder();
|
||||
//设置代理
|
||||
if (configStorage.getHttpProxyHost() != null && configStorage.getHttpProxyPort() > 0) {
|
||||
httpProxy = OkHttpProxyInfo.httpProxy(configStorage.getHttpProxyHost(),
|
||||
configStorage.getHttpProxyPort(),
|
||||
configStorage.getHttpProxyUsername(),
|
||||
configStorage.getHttpProxyPassword());
|
||||
}
|
||||
|
||||
OkHttpClient.Builder clientBuilder = new OkHttpClient.Builder();
|
||||
if (httpProxy != null) {
|
||||
clientBuilder.proxy(getRequestHttpProxy().getProxy());
|
||||
|
||||
|
Reference in New Issue
Block a user