mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
🎨 #3128 【微信支付】提供扩展httpclientbuilder的能力
This commit is contained in:
@@ -28,6 +28,7 @@ import java.io.InputStream;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Base64;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
@@ -335,6 +336,12 @@ public class WxPayServiceApacheHttpImpl extends BaseWxPayServiceImpl {
|
||||
httpClientBuilder.setDefaultCredentialsProvider(provider)
|
||||
.setProxy(new HttpHost(this.getConfig().getHttpProxyHost(), this.getConfig().getHttpProxyPort()));
|
||||
}
|
||||
|
||||
// 提供自定义httpClientBuilder的能力
|
||||
Optional.ofNullable(getConfig().getHttpClientBuilderCustomizer()).ifPresent(e -> {
|
||||
e.customize(httpClientBuilder);
|
||||
});
|
||||
|
||||
return httpClientBuilder;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user