mirror of
				https://gitee.com/binary/weixin-java-tools.git
				synced 2025-11-01 03:25:35 +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
	 Binary Wang
					Binary Wang