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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]