File tree Expand file tree Collapse file tree
src/main/java/me/chanjar/weixin/channel/api/impl
main/java/cn/binarywang/wx/miniapp/api/impl
test/java/cn/binarywang/wx/miniapp/api/impl
src/main/java/me/chanjar/weixin/mp/api/impl
src/main/java/me/chanjar/weixin/open/api/impl
main/java/com/github/binarywang/wxpay/service/impl
test/java/com/github/binarywang/wxpay/service/impl
src/main/java/me/chanjar/weixin/qidian/api/impl Expand file tree Collapse file tree Original file line number Diff line number Diff line change 162162 <version >4.12.0</version >
163163 <scope >provided</scope >
164164 </dependency >
165- <!-- HttpClient 5.x - 默认依赖(推荐使用) -->
165+ <!-- HttpClient 5.x - 可选依赖,显式使用 HttpComponents 实现时需要 -->
166166 <dependency >
167167 <groupId >org.apache.httpcomponents.client5</groupId >
168168 <artifactId >httpclient5</artifactId >
Original file line number Diff line number Diff line change 3232 <dependency >
3333 <groupId >org.apache.httpcomponents</groupId >
3434 <artifactId >httpclient</artifactId >
35- <scope >provided</scope >
3635 </dependency >
3736 <dependency >
3837 <groupId >org.apache.httpcomponents</groupId >
3938 <artifactId >httpmime</artifactId >
40- <scope >provided</scope >
4139 </dependency >
4240 <dependency >
4341 <groupId >org.apache.httpcomponents.client5</groupId >
Original file line number Diff line number Diff line change 88 * @author <a href="https://github.com/lixize">Zeyes</a>
99 */
1010@ Slf4j
11- public class WxChannelServiceImpl extends WxChannelServiceHttpComponentsImpl {
11+ public class WxChannelServiceImpl extends WxChannelServiceHttpClientImpl {
1212
1313 public WxChannelServiceImpl () {
1414 }
Original file line number Diff line number Diff line change 2424 <artifactId >okhttp</artifactId >
2525 <scope >provided</scope >
2626 </dependency >
27- <!-- HttpClient 5.x - 默认依赖(推荐使用) -->
27+ <!-- HttpClient 5.x - 可选依赖,显式使用 HttpComponents 实现时需要 -->
2828 <dependency >
2929 <groupId >org.apache.httpcomponents.client5</groupId >
3030 <artifactId >httpclient5</artifactId >
31+ <scope >provided</scope >
3132 </dependency >
3233
3334 <!-- HttpClient 4.x - 默认依赖(为了保持向后兼容) -->
3435 <dependency >
3536 <groupId >org.apache.httpcomponents</groupId >
3637 <artifactId >httpclient</artifactId >
37- <scope >provided</scope >
3838 <exclusions >
3939 <exclusion >
4040 <artifactId >commons-logging</artifactId >
4545 <dependency >
4646 <groupId >org.apache.httpcomponents</groupId >
4747 <artifactId >httpmime</artifactId >
48- <scope >provided</scope >
4948 </dependency >
5049
5150 <dependency >
Original file line number Diff line number Diff line change 3333 <dependency >
3434 <groupId >org.apache.httpcomponents</groupId >
3535 <artifactId >httpclient</artifactId >
36- <scope >provided</scope >
3736 </dependency >
3837 <dependency >
3938 <groupId >org.apache.httpcomponents.client5</groupId >
Original file line number Diff line number Diff line change 3434 <dependency >
3535 <groupId >org.apache.httpcomponents</groupId >
3636 <artifactId >httpclient</artifactId >
37- <scope >provided</scope >
3837 </dependency >
3938 <dependency >
4039 <groupId >org.apache.httpcomponents</groupId >
4140 <artifactId >httpmime</artifactId >
42- <scope >provided</scope >
4341 </dependency >
4442 <dependency >
4543 <groupId >org.apache.httpcomponents.client5</groupId >
Original file line number Diff line number Diff line change 66 * @author <a href="https://github.com/binarywang">Binary Wang</a>
77 */
88@ Slf4j
9- public class WxMaServiceImpl extends WxMaServiceHttpComponentsImpl {
9+ public class WxMaServiceImpl extends WxMaServiceHttpClientImpl {
1010
1111}
Original file line number Diff line number Diff line change 1111import me .chanjar .weixin .common .error .WxError ;
1212import me .chanjar .weixin .common .error .WxErrorException ;
1313import me .chanjar .weixin .common .error .WxMpErrorMsgEnum ;
14+ import me .chanjar .weixin .common .util .http .HttpClientType ;
1415import me .chanjar .weixin .common .util .http .RequestExecutor ;
1516import org .apache .commons .lang3 .StringUtils ;
1617import org .mockito .Mockito ;
@@ -118,6 +119,8 @@ public void testGetRequestHttpProxy() {
118119
119120 @ Test
120121 public void testGetRequestType () {
122+ assertThat (new WxMaServiceImpl ().getRequestType ()).isEqualTo (HttpClientType .APACHE_HTTP );
123+ assertThat (new WxMaServiceHttpComponentsImpl ().getRequestType ()).isEqualTo (HttpClientType .HTTP_COMPONENTS );
121124 }
122125
123126 @ Test
Original file line number Diff line number Diff line change 3434 <dependency >
3535 <groupId >org.apache.httpcomponents</groupId >
3636 <artifactId >httpclient</artifactId >
37- <scope >provided</scope >
3837 </dependency >
3938 <dependency >
4039 <groupId >org.apache.httpcomponents</groupId >
4140 <artifactId >httpmime</artifactId >
42- <scope >provided</scope >
4341 </dependency >
4442 <dependency >
4543 <groupId >org.apache.httpcomponents.client5</groupId >
Original file line number Diff line number Diff line change 22
33/**
44 * <pre>
5- * 默认接口实现类,使用apache httpClient 5实现
5+ * 默认接口实现类,使用 Apache HttpClient 4 实现.
66 * Created by Binary Wang on 2017-5-27.
77 * </pre>
88 *
99 * @author <a href="https://github.com/binarywang">Binary Wang</a>
1010 */
11- public class WxMpServiceImpl extends WxMpServiceHttpComponentsImpl {
11+ public class WxMpServiceImpl extends WxMpServiceHttpClientImpl {
1212}
You can’t perform that action at this time.
0 commit comments