From 166d85bffc4389e7e9c5531bc346c46bdd415860 Mon Sep 17 00:00:00 2001 From: Calamar112 Date: Mon, 15 May 2017 21:59:23 +0200 Subject: [PATCH 1/2] Update monitor_update.java Some variable names changes --- RESTful service/monitor_update.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RESTful service/monitor_update.java b/RESTful service/monitor_update.java index 460585b..0724683 100644 --- a/RESTful service/monitor_update.java +++ b/RESTful service/monitor_update.java @@ -67,7 +67,7 @@ private String putHttp(String url, Map putParams, CloseableHttpClient httpClient = HttpClients.createDefault(); try { - HttpPut httPut = new HttpPut(url); + HttpPut httpPut = new HttpPut(url); if (headerParams != null) { for (String key : headerParams.keySet()) { @@ -109,12 +109,12 @@ public String update(String streamID, String streamUrl, String streamName, Strin String record, String accessKey, String accessSecret){ String result = null; String reqUrl = "https://api.acrcloud.com/v1/monitor-streams/"+streamID; - String htttMethod = "PUT"; + String httpMethod = "PUT"; String httpAction = "/v1/monitor-streams/"+streamID; String signature_version = "1"; String timestamp = this.getUTCTimeSeconds(); - String sigStr = htttMethod + "\n" + httpAction + "\n" + accessKey + String sigStr = httpMethod + "\n" + httpAction + "\n" + accessKey + "\n" + signatureVersion + "\n" + timestamp; String signature = encryptByHMACSHA1(sigStr.getBytes(), accessSecret.getBytes()); From e4ae678d30edbeec526238187baa622984d9115c Mon Sep 17 00:00:00 2001 From: Calamar112 Date: Mon, 15 May 2017 22:02:52 +0200 Subject: [PATCH 2/2] Update monitor_update.java --- RESTful service/monitor_update.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RESTful service/monitor_update.java b/RESTful service/monitor_update.java index 0724683..1fd5216 100644 --- a/RESTful service/monitor_update.java +++ b/RESTful service/monitor_update.java @@ -77,7 +77,7 @@ private String putHttp(String url, Map putParams, } JSONObject jsonObject = JSONObject.fromObject(putParams); - jsonString = jsonObject.toString(); + String jsonString = jsonObject.toString(); StringEntity params = new StringEntity(jsonString, "UTF-8"); params.setContentType("application/json");