|
|
@@ -25,6 +25,7 @@ import org.apache.http.auth.AuthScope; |
|
|
|
import org.apache.http.auth.UsernamePasswordCredentials; |
|
|
|
import org.apache.http.client.ClientProtocolException; |
|
|
|
import org.apache.http.client.CredentialsProvider; |
|
|
|
import org.apache.http.client.config.RequestConfig; |
|
|
|
import org.apache.http.client.methods.CloseableHttpResponse; |
|
|
|
import org.apache.http.client.methods.HttpGet; |
|
|
|
import org.apache.http.impl.client.BasicCredentialsProvider; |
|
|
@@ -85,6 +86,10 @@ public class WxCpServiceImpl implements WxCpService { |
|
|
|
+ "&corpsecret=" + wxCpConfigStorage.getCorpSecret(); |
|
|
|
try { |
|
|
|
HttpGet httpGet = new HttpGet(url); |
|
|
|
if (httpProxy != null) { |
|
|
|
RequestConfig config = RequestConfig.custom().setProxy(httpProxy).build(); |
|
|
|
httpGet.setConfig(config); |
|
|
|
} |
|
|
|
CloseableHttpClient httpclient = getHttpclient(); |
|
|
|
CloseableHttpResponse response = httpclient.execute(httpGet); |
|
|
|
String resultContent = new BasicResponseHandler().handleResponse(response); |
|
|
|