TyrantLucifer commented on code in PR #3351:
URL: 
https://github.com/apache/incubator-seatunnel/pull/3351#discussion_r1017810809


##########
seatunnel-connectors-v2/connector-http/connector-http-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/http/config/HttpParameter.java:
##########
@@ -40,35 +40,35 @@ public class HttpParameter implements Serializable {
 
     public void buildWithConfig(Config pluginConfig) {
         // set url
-        this.setUrl(pluginConfig.getString(HttpConfig.URL));
+        this.setUrl(pluginConfig.getString(HttpConfig.URL.key()));
         // set method
-        if (pluginConfig.hasPath(HttpConfig.METHOD)) {
-            this.setMethod(pluginConfig.getString(HttpConfig.METHOD));
+        if (pluginConfig.hasPath(HttpConfig.METHOD.key())) {
+            this.setMethod(pluginConfig.getString(HttpConfig.METHOD.key()));
         } else {
             this.setMethod(HttpConfig.METHOD_DEFAULT_VALUE);
         }
         // set headers
-        if (pluginConfig.hasPath(HttpConfig.HEADERS)) {
-            
this.setHeaders(pluginConfig.getConfig(HttpConfig.HEADERS).entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey,
 entry -> String.valueOf(entry.getValue().unwrapped()), (v1, v2) -> v2)));
+        if (pluginConfig.hasPath(HttpConfig.HEADERS.key())) {
+            
this.setHeaders(pluginConfig.getConfig(HttpConfig.HEADERS.key()).entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey,
 entry -> String.valueOf(entry.getValue().unwrapped()), (v1, v2) -> v2)));
         }
         // set params
-        if (pluginConfig.hasPath(HttpConfig.PARAMS)) {
-            
this.setParams(pluginConfig.getConfig(HttpConfig.PARAMS).entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey,
 entry -> String.valueOf(entry.getValue().unwrapped()), (v1, v2) -> v2)));
+        if (pluginConfig.hasPath(HttpConfig.PARAMS.key())) {
+            
this.setParams(pluginConfig.getConfig(HttpConfig.PARAMS.key()).entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey,
 entry -> String.valueOf(entry.getValue().unwrapped()), (v1, v2) -> v2)));
         }
         // set body
-        if (pluginConfig.hasPath(HttpConfig.BODY)) {
-            this.setBody(pluginConfig.getString(HttpConfig.BODY));
+        if (pluginConfig.hasPath(HttpConfig.BODY.key())) {
+            this.setBody(pluginConfig.getString(HttpConfig.BODY.key()));
         }
-        if (pluginConfig.hasPath(HttpConfig.POLL_INTERVAL_MILLS)) {
-            
this.setPollIntervalMillis(pluginConfig.getInt(HttpConfig.POLL_INTERVAL_MILLS));
+        if (pluginConfig.hasPath(HttpConfig.POLL_INTERVAL_MILLS.key())) {
+            
this.setPollIntervalMillis(pluginConfig.getInt(HttpConfig.POLL_INTERVAL_MILLS.key()));
         }
-        if (pluginConfig.hasPath(HttpConfig.RETRY)) {
-            this.setRetry(pluginConfig.getInt(HttpConfig.RETRY));
-            if (pluginConfig.hasPath(HttpConfig.RETRY_BACKOFF_MULTIPLIER_MS)) {
-                
this.setRetryBackoffMultiplierMillis(pluginConfig.getInt(HttpConfig.RETRY_BACKOFF_MULTIPLIER_MS));
+        if (pluginConfig.hasPath(HttpConfig.RETRY.key())) {
+            this.setRetry(pluginConfig.getInt(HttpConfig.RETRY.key()));
+            if 
(pluginConfig.hasPath(HttpConfig.RETRY_BACKOFF_MULTIPLIER_MS.key())) {

Review Comment:
   Fixed, PTAL



-- 
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]

Reply via email to