|
|
@@ -1,8 +1,8 @@ |
|
|
|
package com.nsgk.agentcentersdk.api; |
|
|
|
|
|
|
|
import cn.hutool.core.util.URLUtil; |
|
|
|
import com.alibaba.fastjson2.JSON; |
|
|
|
import com.alibaba.fastjson2.JSONObject; |
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.nsgk.agentcentersdk.core.NSConstants; |
|
|
|
import com.nsgk.agentcentersdk.core.NSProtocol; |
|
|
|
import com.nsgk.agentcentersdk.core.NSReportObject; |
|
|
@@ -35,12 +35,12 @@ import lombok.experimental.Accessors; |
|
|
|
public final class NSSDKClient |
|
|
|
{ |
|
|
|
private final String host; |
|
|
|
private final short port; |
|
|
|
private final Short port; |
|
|
|
private final String identifier; |
|
|
|
private final String publicKey; |
|
|
|
private int timeout; |
|
|
|
|
|
|
|
NSSDKClient(String host, short port, String identifier, String publicKey, int timeout) |
|
|
|
NSSDKClient(String host, Short port, String identifier, String publicKey, int timeout) |
|
|
|
{ |
|
|
|
this.host = host; |
|
|
|
this.port = port; |
|
|
@@ -74,7 +74,7 @@ public final class NSSDKClient |
|
|
|
|
|
|
|
private String BuildUrl(String url) |
|
|
|
{ |
|
|
|
return URLUtil.completeUrl(host + ":" + port, url); |
|
|
|
return URLUtil.completeUrl(host + (null != port ? ":" + port : ""), url); |
|
|
|
} |
|
|
|
|
|
|
|
private <T> void WriteDataObject(NSNetworkRequest request, NSReportObject<T> object) |
|
|
|