SDK的地址和密钥添加trim,避免空格换行等问题
This commit is contained in:
@@ -38,8 +38,8 @@ public class AdminHttpUtils extends JsonUtils {
|
||||
private static CloseableHttpClient httpClient;
|
||||
|
||||
public static void init(String url, String secret) {
|
||||
adminUrl = url;
|
||||
adminSecret = secret;
|
||||
adminUrl = url.trim();
|
||||
adminSecret = secret.trim();
|
||||
PoolingHttpClientConnectionManager cm = new PoolingHttpClientConnectionManager();
|
||||
cm.setValidateAfterInactivity(1000);
|
||||
httpClient = HttpClients.custom()
|
||||
|
||||
@@ -35,9 +35,9 @@ public class ChannelHttpUtils extends JsonUtils {
|
||||
private final CloseableHttpClient httpClient;
|
||||
|
||||
public ChannelHttpUtils(String imurl, String channelId, String secret) {
|
||||
this.imurl = imurl;
|
||||
this.channelId = channelId;
|
||||
this.channelSecret = secret;
|
||||
this.imurl = imurl.trim();
|
||||
this.channelId = channelId.trim();
|
||||
this.channelSecret = secret.trim();
|
||||
PoolingHttpClientConnectionManager cm = new PoolingHttpClientConnectionManager();
|
||||
cm.setValidateAfterInactivity(1000);
|
||||
httpClient = HttpClients.custom()
|
||||
|
||||
@@ -36,9 +36,9 @@ public class RobotHttpUtils extends JsonUtils {
|
||||
private final CloseableHttpClient httpClient;
|
||||
|
||||
public RobotHttpUtils(String url, String robotId, String robotSecret) {
|
||||
this.url = url;
|
||||
this.robotId = robotId;
|
||||
this.robotSecret = robotSecret;
|
||||
this.url = url.trim();
|
||||
this.robotId = robotId.trim();
|
||||
this.robotSecret = robotSecret.trim();
|
||||
PoolingHttpClientConnectionManager cm = new PoolingHttpClientConnectionManager();
|
||||
cm.setValidateAfterInactivity(1000);
|
||||
httpClient = HttpClients.custom()
|
||||
|
||||
Reference in New Issue
Block a user