🎨 初步引入 Apache HttpClient 5.x
This commit is contained in:
@@ -4,7 +4,7 @@ import cn.binarywang.wx.miniapp.api.WxMaService;
|
||||
import cn.binarywang.wx.miniapp.bean.WxMaStableAccessTokenRequest;
|
||||
import cn.binarywang.wx.miniapp.config.WxMaConfig;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.chanjar.weixin.common.util.http.HttpType;
|
||||
import me.chanjar.weixin.common.util.http.HttpClientType;
|
||||
import me.chanjar.weixin.common.util.http.apache.ApacheBasicResponseHandler;
|
||||
import me.chanjar.weixin.common.util.http.apache.ApacheHttpClientBuilder;
|
||||
import me.chanjar.weixin.common.util.http.apache.DefaultApacheHttpClientBuilder;
|
||||
@@ -58,8 +58,8 @@ public class WxMaServiceHttpClientImpl extends BaseWxMaServiceImpl {
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpType getRequestType() {
|
||||
return HttpType.APACHE_HTTP;
|
||||
public HttpClientType getRequestType() {
|
||||
return HttpClientType.APACHE_HTTP;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -8,7 +8,7 @@ import jodd.http.HttpRequest;
|
||||
import jodd.http.ProxyInfo;
|
||||
import jodd.http.net.SocketHttpConnectionProvider;
|
||||
import jodd.net.MimeTypes;
|
||||
import me.chanjar.weixin.common.util.http.HttpType;
|
||||
import me.chanjar.weixin.common.util.http.HttpClientType;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -43,8 +43,8 @@ public class WxMaServiceJoddHttpImpl extends BaseWxMaServiceImpl<HttpConnectionP
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpType getRequestType() {
|
||||
return HttpType.JODD_HTTP;
|
||||
public HttpClientType getRequestType() {
|
||||
return HttpClientType.JODD_HTTP;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -3,7 +3,7 @@ package cn.binarywang.wx.miniapp.api.impl;
|
||||
import cn.binarywang.wx.miniapp.api.WxMaService;
|
||||
import cn.binarywang.wx.miniapp.bean.WxMaStableAccessTokenRequest;
|
||||
import cn.binarywang.wx.miniapp.config.WxMaConfig;
|
||||
import me.chanjar.weixin.common.util.http.HttpType;
|
||||
import me.chanjar.weixin.common.util.http.HttpClientType;
|
||||
import me.chanjar.weixin.common.util.http.okhttp.DefaultOkHttpClientBuilder;
|
||||
import me.chanjar.weixin.common.util.http.okhttp.OkHttpProxyInfo;
|
||||
import okhttp3.*;
|
||||
@@ -58,8 +58,8 @@ public class WxMaServiceOkHttpImpl extends BaseWxMaServiceImpl<OkHttpClient, OkH
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpType getRequestType() {
|
||||
return HttpType.OK_HTTP;
|
||||
public HttpClientType getRequestType() {
|
||||
return HttpClientType.OK_HTTP;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user