|
@@ -31,11 +31,11 @@ public class OpenAPIClient {
|
|
|
this.secretKey = secretKey;
|
|
this.secretKey = secretKey;
|
|
|
this.url = url;
|
|
this.url = url;
|
|
|
}
|
|
}
|
|
|
- public String handler(String data){
|
|
|
|
|
|
|
+ public String handler(String path,String data){
|
|
|
User user = new User(data);
|
|
User user = new User(data);
|
|
|
String json = JSONUtil.toJsonStr(user);
|
|
String json = JSONUtil.toJsonStr(user);
|
|
|
String timestamp = System.currentTimeMillis() + "";
|
|
String timestamp = System.currentTimeMillis() + "";
|
|
|
- HttpResponse httpResponse = HttpRequest.post(url)
|
|
|
|
|
|
|
+ HttpResponse httpResponse = HttpRequest.post(url+path)
|
|
|
.header("accessKey",accessKey)//accessKey
|
|
.header("accessKey",accessKey)//accessKey
|
|
|
.header("timestamp", timestamp)//时间戳
|
|
.header("timestamp", timestamp)//时间戳
|
|
|
.header("sign",getSign(secretKey,timestamp))//摘要签名
|
|
.header("sign",getSign(secretKey,timestamp))//摘要签名
|