You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/07/25 12:02:05 UTC

[GitHub] [inlong] woofyzhao opened a new pull request, #5198: [INLONG-5197][Manager] Unify openAPI http method to POST

woofyzhao opened a new pull request, #5198:
URL: https://github.com/apache/inlong/pull/5198

   
   - Fixes #5197 
   
   The usage of get or post seems to be not quite in line. After discussion with heal we decide to unify open api request method to POST.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] dockerzhang merged pull request #5198: [INLONG-5197][Manager] Unify the HTTP request method of the OpenAPI query interface from GET to POST

Posted by GitBox <gi...@apache.org>.
dockerzhang merged PR #5198:
URL: https://github.com/apache/inlong/pull/5198


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] healchow commented on a diff in pull request #5198: [INLONG-5197][Manager] Unify the HTTP request method of the OpenAPI query interface from GET to POST

Posted by GitBox <gi...@apache.org>.
healchow commented on code in PR #5198:
URL: https://github.com/apache/inlong/pull/5198#discussion_r929436863


##########
inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/config/RemoteConfigManager.java:
##########
@@ -182,20 +183,25 @@ private void setReloadTimer() {
      * reloadDataProxyConfig
      */
     private boolean reloadDataProxyConfig(String clusterName, String clusterTag, String host) {
-        HttpGet httpGet = null;
+        HttpPost httpPost = null;
         try {
-            String url = "http://" + host + ConfigConstants.MANAGER_PATH + ConfigConstants.MANAGER_GET_ALL_CONFIG_PATH
-                    + "?clusterName=" + clusterName + "&clusterTag=" + clusterTag;
+            String url = "http://" + host + ConfigConstants.MANAGER_PATH + ConfigConstants.MANAGER_GET_ALL_CONFIG_PATH;
+            httpPost = new HttpPost(url);
+            httpPost.addHeader(HttpHeaders.CONNECTION, "close");
+            httpPost.addHeader(HttpHeaders.AUTHORIZATION, AuthUtils.genBasicAuth());
+
+            // http body
+            Map<String, String> params = new HashMap<>();

Review Comment:
   It is recommended to use Java's POJO class to encapsulate request parameters instead of manually inserting Key and Value into Map.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org