File tree Expand file tree Collapse file tree 6 files changed +35
-0
lines changed
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/impl
weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/impl Expand file tree Collapse file tree 6 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 44import me .chanjar .weixin .common .bean .WxAccessToken ;
55import me .chanjar .weixin .common .bean .result .WxError ;
66import me .chanjar .weixin .common .exception .WxErrorException ;
7+ import me .chanjar .weixin .common .util .http .HttpType ;
78import me .chanjar .weixin .common .util .http .apache .ApacheHttpClientBuilder ;
89import me .chanjar .weixin .common .util .http .apache .DefaultApacheHttpClientBuilder ;
910import me .chanjar .weixin .cp .api .WxCpConfigStorage ;
@@ -32,6 +33,11 @@ public HttpHost getRequestHttpProxy() {
3233 return httpProxy ;
3334 }
3435
36+ @ Override
37+ public HttpType getRequestType () {
38+ return HttpType .apacheHttp ;
39+ }
40+
3541 @ Override
3642 public String getAccessToken (boolean forceRefresh ) throws WxErrorException {
3743 if (forceRefresh ) {
Original file line number Diff line number Diff line change 44import me .chanjar .weixin .common .bean .WxAccessToken ;
55import me .chanjar .weixin .common .bean .result .WxError ;
66import me .chanjar .weixin .common .exception .WxErrorException ;
7+ import me .chanjar .weixin .common .util .http .HttpType ;
78import me .chanjar .weixin .cp .api .WxCpConfigStorage ;
89import me .chanjar .weixin .cp .api .impl .AbstractWxCpServiceImpl ;
910
@@ -22,6 +23,11 @@ public ProxyInfo getRequestHttpProxy() {
2223 return httpProxy ;
2324 }
2425
26+ @ Override
27+ public HttpType getRequestType () {
28+ return HttpType .joddHttp ;
29+ }
30+
2531 @ Override
2632 public String getAccessToken (boolean forceRefresh ) throws WxErrorException {
2733 if (forceRefresh ) {
Original file line number Diff line number Diff line change 55import me .chanjar .weixin .common .bean .WxAccessToken ;
66import me .chanjar .weixin .common .bean .result .WxError ;
77import me .chanjar .weixin .common .exception .WxErrorException ;
8+ import me .chanjar .weixin .common .util .http .HttpType ;
89import me .chanjar .weixin .common .util .http .okhttp .OkhttpProxyInfo ;
910import me .chanjar .weixin .cp .api .WxCpConfigStorage ;
1011import me .chanjar .weixin .cp .api .impl .AbstractWxCpServiceImpl ;
@@ -25,6 +26,11 @@ public OkhttpProxyInfo getRequestHttpProxy() {
2526 return httpProxy ;
2627 }
2728
29+ @ Override
30+ public HttpType getRequestType () {
31+ return HttpType .okHttp ;
32+ }
33+
2834 @ Override
2935 public String getAccessToken (boolean forceRefresh ) throws WxErrorException {
3036 if (forceRefresh ) {
Original file line number Diff line number Diff line change @@ -46,6 +46,11 @@ public HttpHost getRequestHttpProxy() {
4646 return httpProxy ;
4747 }
4848
49+ @ Override
50+ public HttpType getRequestType () {
51+ return HttpType .apacheHttp ;
52+ }
53+
4954 @ Override
5055 public void initHttp () {
5156 WxMpConfigStorage configStorage = this .getWxMpConfigStorage ();
Original file line number Diff line number Diff line change 55import me .chanjar .weixin .common .bean .WxAccessToken ;
66import me .chanjar .weixin .common .bean .result .WxError ;
77import me .chanjar .weixin .common .exception .WxErrorException ;
8+ import me .chanjar .weixin .common .util .http .HttpType ;
89import me .chanjar .weixin .mp .api .*;
910import me .chanjar .weixin .mp .api .impl .*;
1011
@@ -27,6 +28,11 @@ public ProxyInfo getRequestHttpProxy() {
2728 return httpProxy ;
2829 }
2930
31+ @ Override
32+ public HttpType getRequestType () {
33+ return HttpType .joddHttp ;
34+ }
35+
3036 @ Override
3137 public void initHttp () {
3238
Original file line number Diff line number Diff line change 33import me .chanjar .weixin .common .bean .WxAccessToken ;
44import me .chanjar .weixin .common .bean .result .WxError ;
55import me .chanjar .weixin .common .exception .WxErrorException ;
6+ import me .chanjar .weixin .common .util .http .HttpType ;
67import me .chanjar .weixin .common .util .http .okhttp .OkhttpProxyInfo ;
78import me .chanjar .weixin .mp .api .WxMpConfigStorage ;
89import me .chanjar .weixin .mp .api .WxMpService ;
@@ -26,6 +27,11 @@ public OkhttpProxyInfo getRequestHttpProxy() {
2627 return httpProxy ;
2728 }
2829
30+ @ Override
31+ public HttpType getRequestType () {
32+ return HttpType .okHttp ;
33+ }
34+
2935 @ Override
3036 public String getAccessToken (boolean forceRefresh ) throws WxErrorException {
3137 Lock lock = this .getWxMpConfigStorage ().getAccessTokenLock ();
You can’t perform that action at this time.
0 commit comments