This is an automated email from the ASF dual-hosted git repository.

hansva pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/hop.git


The following commit(s) were added to refs/heads/main by this push:
     new bef34d0f06 Fix missing body parameters when uploading files via HTTP 
Post (#6491)
bef34d0f06 is described below

commit bef34d0f06db8c0b7b1dbebb6b0dfebdde6eaabc
Author: lance <[email protected]>
AuthorDate: Tue Feb 10 17:44:11 2026 +0800

    Fix missing body parameters when uploading files via HTTP Post (#6491)
    
    Signed-off-by: lance <[email protected]>
---
 .../hop/pipeline/transforms/httppost/HttpPost.java | 352 ++++++++++++---------
 .../transforms/httppost/HttpPostArgumentField.java |  36 +--
 .../transforms/httppost/HttpPostDialog.java        |   2 +-
 .../transforms/httppost/HttpPostLookupField.java   |  20 +-
 .../pipeline/transforms/httppost/HttpPostMeta.java | 220 +------------
 .../transforms/httppost/HttpPostQuery.java         |  28 +-
 .../transforms/httppost/HttpPostResultField.java   |  44 +--
 7 files changed, 246 insertions(+), 456 deletions(-)

diff --git 
a/plugins/transforms/httppost/src/main/java/org/apache/hop/pipeline/transforms/httppost/HttpPost.java
 
b/plugins/transforms/httppost/src/main/java/org/apache/hop/pipeline/transforms/httppost/HttpPost.java
index a35fed729b..3a8b759d59 100644
--- 
a/plugins/transforms/httppost/src/main/java/org/apache/hop/pipeline/transforms/httppost/HttpPost.java
+++ 
b/plugins/transforms/httppost/src/main/java/org/apache/hop/pipeline/transforms/httppost/HttpPost.java
@@ -24,15 +24,17 @@ import java.io.InputStreamReader;
 import java.io.UnsupportedEncodingException;
 import java.net.HttpURLConnection;
 import java.net.URI;
-import java.net.URLEncoder;
 import java.net.UnknownHostException;
+import java.nio.charset.Charset;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 import org.apache.commons.lang.StringUtils;
 import org.apache.hop.core.Const;
 import org.apache.hop.core.exception.HopException;
+import org.apache.hop.core.exception.HopFileException;
 import org.apache.hop.core.exception.HopTransformException;
+import org.apache.hop.core.exception.HopValueException;
 import org.apache.hop.core.row.RowDataUtil;
 import org.apache.hop.core.util.HttpClientManager;
 import org.apache.hop.core.util.StringUtil;
@@ -53,7 +55,7 @@ import org.apache.http.client.entity.UrlEncodedFormEntity;
 import org.apache.http.client.methods.CloseableHttpResponse;
 import org.apache.http.client.protocol.HttpClientContext;
 import org.apache.http.client.utils.URIBuilder;
-import org.apache.http.entity.ByteArrayEntity;
+import org.apache.http.client.utils.URLEncodedUtils;
 import org.apache.http.entity.ContentType;
 import org.apache.http.entity.StringEntity;
 import org.apache.http.entity.mime.MultipartEntityBuilder;
@@ -119,120 +121,22 @@ public class HttpPost extends 
BaseTransform<HttpPostMeta, HttpPostData> {
       URI uri = uriBuilder.build();
       org.apache.http.client.methods.HttpPost post =
           new org.apache.http.client.methods.HttpPost(uri);
-      String bodyParams = null;
-
-      // Specify content type and encoding
-      // If content encoding is not explicitly specified
-      // ISO-8859-1 is assumed by the POSTMethod
-      if (!data.contentTypeHeaderOverwrite && !meta.isPostAFile()) {
-        // can be overwritten now
-        if (Utils.isEmpty(data.realEncoding)) {
-          post.setHeader(CONTENT_TYPE, CONTENT_TYPE_TEXT_XML);
-          if (isDebug()) {
-            logDebug(
-                BaseMessages.getString(PKG, PKG_HEADER_VALUE, CONTENT_TYPE, 
CONTENT_TYPE_TEXT_XML));
-          }
-        } else {
-          post.setHeader(CONTENT_TYPE, CONTENT_TYPE_TEXT_XML + "; " + 
data.realEncoding);
-          if (isDebug()) {
-            logDebug(
-                BaseMessages.getString(
-                    PKG,
-                    PKG_HEADER_VALUE,
-                    CONTENT_TYPE,
-                    CONTENT_TYPE_TEXT_XML + "; " + data.realEncoding));
-          }
-        }
-      }
 
-      // HEADER PARAMETERS
-      if (data.useHeaderParameters) {
-        // set header parameters that we want to send
-        for (int i = 0; i < data.header_parameters_nrs.length; i++) {
-          post.addHeader(
-              data.headerParameters[i].getName(),
-              data.inputRowMeta.getString(rowData, 
data.header_parameters_nrs[i]));
-          if (isDebug()) {
-            logDebug(
-                BaseMessages.getString(
-                    PKG,
-                    PKG_HEADER_VALUE,
-                    data.headerParameters[i].getName(),
-                    data.inputRowMeta.getString(rowData, 
data.header_parameters_nrs[i])));
-          }
-        }
-      }
+      MultipartEntityBuilder multipart = null;
+      boolean useMultipart = meta.isPostAFile() || meta.isMultipartupload();
 
-      // BODY PARAMETERS
-      if (data.useBodyParameters) {
-        // set body parameters that we want to send
-        for (int i = 0; i < data.body_parameters_nrs.length; i++) {
-          String bodyParameterName = data.bodyParameters[i].getName();
-          String bodyParameterValue =
-              data.inputRowMeta.getString(rowData, 
data.body_parameters_nrs[i]);
-          data.bodyParameters[i] = new BasicNameValuePair(bodyParameterName, 
bodyParameterValue);
-          if (isDebug()) {
-            logDebug(
-                BaseMessages.getString(
-                    PKG, "HTTPPOST.Log.BodyValue", bodyParameterName, 
bodyParameterValue));
-          }
-        }
-        bodyParams = getRequestBodyParamsAsStr(data.bodyParameters, 
data.realEncoding);
-        post.setEntity(
-            (new StringEntity(bodyParams, 
ContentType.TEXT_XML.withCharset("US-ASCII"))));
+      if (useMultipart) {
+        multipart = MultipartEntityBuilder.create();
       }
-
+      // add HttpPost headers
+      addHttpHeaders(post, rowData);
       // QUERY PARAMETERS
-      if (data.useQueryParameters) {
-        for (int i = 0; i < data.query_parameters_nrs.length; i++) {
-          String queryParameterName = data.queryParameters[i].getName();
-          String queryParameterValue =
-              data.inputRowMeta.getString(rowData, 
data.query_parameters_nrs[i]);
-          data.queryParameters[i] = new BasicNameValuePair(queryParameterName, 
queryParameterValue);
-          if (isDebug()) {
-            logDebug(
-                BaseMessages.getString(
-                    PKG, "HTTPPOST.Log.QueryValue", queryParameterName, 
queryParameterValue));
-          }
-        }
-        post.setEntity(new 
UrlEncodedFormEntity(Arrays.asList(data.queryParameters)));
-      }
-
+      addQueryParams(post, rowData);
+      // BODY PARAMETERS
+      addBodyParams(post, rowData, multipart);
       // Set request entity?
-      if (data.indexOfRequestEntity >= 0) {
-        MultipartEntityBuilder multipartEntityBuilder = 
MultipartEntityBuilder.create();
-        String tmp = data.inputRowMeta.getString(rowData, 
data.indexOfRequestEntity);
-        HttpEntity entity = null;
-        byte[] bytes = null;
-        // Request content will be retrieved directly
-        // from the input stream
-        // Per default, the request content needs to be buffered
-        // in order to determine its length.
-        // Request body buffering can be avoided when
-        // content length is explicitly specified
-
-        if (meta.isPostAFile()) {
-          if (!tmp.isEmpty()) {
-            multipartEntityBuilder.addBinaryBody(
-                "file", HopVfs.getFileObject(resolve(tmp)).getPath().toFile());
-            entity = multipartEntityBuilder.build();
-            post.setEntity(entity);
-          }
-        } else {
-          if ((data.realEncoding != null) && (!data.realEncoding.isEmpty())) {
-            bytes = tmp.getBytes(data.realEncoding);
-          } else {
-            bytes = tmp.getBytes();
-          }
-          if (meta.isMultipartupload()) {
-            multipartEntityBuilder.addBinaryBody("file", bytes);
-            entity = multipartEntityBuilder.build();
-            post.setEntity(entity);
-          } else {
-            post.setEntity(new ByteArrayEntity(bytes));
-          }
-        }
-      }
+      addBodyFileParam(rowData, multipart);
+      addBodyParamsAfter(post, multipart);
 
       // Execute request
       Object[] newRow = null;
@@ -263,7 +167,6 @@ public class HttpPost extends BaseTransform<HttpPostMeta, 
HttpPostData> {
         httpResponse = httpClient.execute(target, post, localContext);
 
         int statusCode = requestStatusCode(httpResponse);
-
         // calculate the responseTime
         long responseTime = System.currentTimeMillis() - startTime;
 
@@ -511,17 +414,16 @@ public class HttpPost extends BaseTransform<HttpPostMeta, 
HttpPostData> {
 
     try {
       Object[] outputRowData = callHttpPOST(r);
-      putRow(data.outputRowMeta, outputRowData); // copy row to output 
rowset(s)
+      // copy row to output rowset(s)
+      putRow(data.outputRowMeta, outputRowData);
 
       if (checkFeedback(getLinesRead()) && isDetailed()) {
         logDetailed(BaseMessages.getString(PKG, "HTTPPOST.LineNumber") + 
getLinesRead());
       }
     } catch (HopException e) {
-      boolean sendToErrorRow = false;
-      String errorMessage = null;
+      String errorMessage;
 
       if (getTransformMeta().isDoingErrorHandling()) {
-        sendToErrorRow = true;
         errorMessage = e.toString();
       } else {
         logError(BaseMessages.getString(PKG, 
"HTTPPOST.ErrorInTransformRunning") + e.getMessage());
@@ -532,46 +434,25 @@ public class HttpPost extends BaseTransform<HttpPostMeta, 
HttpPostData> {
         return false;
       }
 
-      if (sendToErrorRow) {
-        // Simply add this row to the error row
-        putError(getInputRowMeta(), r, 1, errorMessage, null, "HTTPPOST001");
-      }
+      // Simply add this row to the error row
+      putError(getInputRowMeta(), r, 1, errorMessage, null, "HTTPPOST001");
     }
 
     return true;
   }
 
   @VisibleForTesting
-  String getRequestBodyParamsAsStr(NameValuePair[] pairs, String charset) 
throws HopException {
-    StringBuilder buf = new StringBuilder();
-    try {
-      for (int i = 0; i < pairs.length; ++i) {
-        NameValuePair pair = pairs[i];
-        if (pair.getName() != null) {
-          if (i > 0) {
-            buf.append("&");
-          }
-
-          buf.append(
-              URLEncoder.encode(
-                  pair.getName(), !StringUtil.isEmpty(charset) ? charset : 
DEFAULT_ENCODING));
-          buf.append("=");
-          if (pair.getValue() != null) {
-            buf.append(
-                URLEncoder.encode(
-                    pair.getValue(), !StringUtil.isEmpty(charset) ? charset : 
DEFAULT_ENCODING));
-          }
-        }
-      }
-      return buf.toString();
-    } catch (UnsupportedEncodingException e) {
-      throw new HopException(e.getMessage(), e.getCause());
+  String getRequestBodyParamsAsStr(NameValuePair[] pairs, String charset) {
+    if (pairs == null || pairs.length == 0) {
+      return "";
     }
+
+    Charset cs = Charset.forName(!StringUtil.isEmpty(charset) ? charset : 
DEFAULT_ENCODING);
+    return URLEncodedUtils.format(Arrays.asList(pairs), cs);
   }
 
   @Override
   public boolean init() {
-
     if (super.init()) {
       // get authentication settings once
       data.realProxyHost = resolve(meta.getProxyHost());
@@ -588,4 +469,185 @@ public class HttpPost extends BaseTransform<HttpPostMeta, 
HttpPostData> {
     }
     return false;
   }
+
+  /**
+   * add http headers
+   *
+   * @param post the HTTP POST request to which the multipart entity will be 
attached
+   */
+  private void addHttpHeaders(org.apache.http.client.methods.HttpPost post, 
Object[] rowData)
+      throws HopValueException {
+    // add HttpPost header ContentType
+    addHeadersContentType(post);
+
+    // HEADER PARAMETERS
+    if (data.useHeaderParameters) {
+      // set header parameters that we want to send
+      for (int i = 0; i < data.header_parameters_nrs.length; i++) {
+        post.addHeader(
+            data.headerParameters[i].getName(),
+            data.inputRowMeta.getString(rowData, 
data.header_parameters_nrs[i]));
+
+        if (isDebug()) {
+          logDebug(
+              BaseMessages.getString(
+                  PKG,
+                  PKG_HEADER_VALUE,
+                  data.headerParameters[i].getName(),
+                  data.inputRowMeta.getString(rowData, 
data.header_parameters_nrs[i])));
+        }
+      }
+    }
+  }
+
+  /**
+   * add HttpPost header ContentType
+   *
+   * @param post the HTTP POST request to which the multipart entity will be 
attached
+   */
+  private void addHeadersContentType(org.apache.http.client.methods.HttpPost 
post) {
+    // Specify content type and encoding
+    // If content encoding is not explicitly specified
+    // ISO-8859-1 is assumed by the POSTMethod
+    if (!data.contentTypeHeaderOverwrite && !meta.isPostAFile()) {
+      // can be overwritten now
+      if (Utils.isEmpty(data.realEncoding)) {
+        post.setHeader(CONTENT_TYPE, CONTENT_TYPE_TEXT_XML);
+        if (isDebug()) {
+          logDebug(
+              BaseMessages.getString(PKG, PKG_HEADER_VALUE, CONTENT_TYPE, 
CONTENT_TYPE_TEXT_XML));
+        }
+      } else {
+        post.setHeader(CONTENT_TYPE, CONTENT_TYPE_TEXT_XML + "; " + 
data.realEncoding);
+        if (isDebug()) {
+          logDebug(
+              BaseMessages.getString(
+                  PKG,
+                  PKG_HEADER_VALUE,
+                  CONTENT_TYPE,
+                  CONTENT_TYPE_TEXT_XML + "; " + data.realEncoding));
+        }
+      }
+    }
+  }
+
+  /**
+   * add http query params
+   *
+   * @param post the HTTP POST request to which the multipart entity will be 
attached
+   * @param rowData row data
+   */
+  private void addQueryParams(org.apache.http.client.methods.HttpPost post, 
Object[] rowData)
+      throws HopValueException, UnsupportedEncodingException {
+    if (!data.useQueryParameters) {
+      return;
+    }
+
+    // QUERY PARAMETERS
+    for (int i = 0; i < data.query_parameters_nrs.length; i++) {
+      String name = data.queryParameters[i].getName();
+      String value = data.inputRowMeta.getString(rowData, 
data.query_parameters_nrs[i]);
+      data.queryParameters[i] = new BasicNameValuePair(name, value);
+
+      if (isDebug()) {
+        logDebug(BaseMessages.getString(PKG, "HTTPPOST.Log.QueryValue", name, 
value));
+      }
+    }
+
+    post.setEntity(new 
UrlEncodedFormEntity(Arrays.asList(data.queryParameters)));
+  }
+
+  /**
+   * set body parameters that we want to send
+   *
+   * @param post the HTTP POST request to which the multipart entity will be 
attached
+   * @param rowData row data
+   */
+  private void addBodyParams(
+      org.apache.http.client.methods.HttpPost post,
+      Object[] rowData,
+      MultipartEntityBuilder multipart)
+      throws HopException {
+    if (!data.useBodyParameters) {
+      return;
+    }
+
+    // set body parameters that we want to send
+    for (int i = 0; i < data.body_parameters_nrs.length; i++) {
+      String name = data.bodyParameters[i].getName();
+      String value = data.inputRowMeta.getString(rowData, 
data.body_parameters_nrs[i]);
+
+      if (multipart != null) {
+        multipart.addTextBody(
+            name,
+            value,
+            ContentType.TEXT_PLAIN.withCharset(
+                !StringUtil.isEmpty(data.realEncoding) ? data.realEncoding : 
DEFAULT_ENCODING));
+      } else {
+        data.bodyParameters[i] = new BasicNameValuePair(name, value);
+      }
+
+      if (isDebug()) {
+        logDebug(BaseMessages.getString(PKG, "HTTPPOST.Log.BodyValue", name, 
value));
+      }
+    }
+
+    //
+    if (multipart == null) {
+      String bodyParams = getRequestBodyParamsAsStr(data.bodyParameters, 
data.realEncoding);
+      post.setEntity((new StringEntity(bodyParams, 
ContentType.TEXT_XML.withCharset("US-ASCII"))));
+    }
+  }
+
+  /**
+   * add file params
+   *
+   * @param rowData row data
+   */
+  private void addBodyFileParam(Object[] rowData, MultipartEntityBuilder 
multipart)
+      throws UnsupportedEncodingException, HopFileException, HopValueException 
{
+    if (data.indexOfRequestEntity < 0) {
+      return;
+    }
+
+    // Set request entity?
+    String tmp = data.inputRowMeta.getString(rowData, 
data.indexOfRequestEntity);
+    byte[] bytes;
+    // Request content will be retrieved directly
+    // from the input stream
+    // Per default, the request content needs to be buffered
+    // in order to determine its length.
+    // Request body buffering can be avoided when
+    // content length is explicitly specified
+
+    if (meta.isPostAFile()) {
+      if (!tmp.isEmpty()) {
+        multipart.addBinaryBody("file", 
HopVfs.getFileObject(resolve(tmp)).getPath().toFile());
+      }
+      return;
+    }
+
+    if ((data.realEncoding != null) && (!data.realEncoding.isEmpty())) {
+      bytes = tmp.getBytes(data.realEncoding);
+    } else {
+      bytes = tmp.getBytes();
+    }
+
+    if (meta.isMultipartupload()) {
+      multipart.addBinaryBody("file", bytes);
+    }
+  }
+
+  /**
+   * Attach body parameters to the HTTP POST request after all parts have been 
prepared.
+   *
+   * @param post the HTTP POST request to which the multipart entity will be 
attached
+   * @param multipart if {@code null}, no entity will be set on the request
+   */
+  private void addBodyParamsAfter(
+      org.apache.http.client.methods.HttpPost post, MultipartEntityBuilder 
multipart) {
+    if (multipart != null) {
+      post.setEntity(multipart.build());
+    }
+  }
 }
diff --git 
a/plugins/transforms/httppost/src/main/java/org/apache/hop/pipeline/transforms/httppost/HttpPostArgumentField.java
 
b/plugins/transforms/httppost/src/main/java/org/apache/hop/pipeline/transforms/httppost/HttpPostArgumentField.java
index bffc9a55bb..2ba4cac2c9 100644
--- 
a/plugins/transforms/httppost/src/main/java/org/apache/hop/pipeline/transforms/httppost/HttpPostArgumentField.java
+++ 
b/plugins/transforms/httppost/src/main/java/org/apache/hop/pipeline/transforms/httppost/HttpPostArgumentField.java
@@ -18,8 +18,12 @@
 package org.apache.hop.pipeline.transforms.httppost;
 
 import java.util.Objects;
+import lombok.Getter;
+import lombok.Setter;
 import org.apache.hop.metadata.api.HopMetadataProperty;
 
+@Getter
+@Setter
 public class HttpPostArgumentField {
 
   @HopMetadataProperty(injectionKeyDescription = 
"HTTPPOST.Injection.ArgumentFieldName")
@@ -31,30 +35,6 @@ public class HttpPostArgumentField {
   @HopMetadataProperty(injectionKeyDescription = 
"HTTPPOST.Injection.ArgumentFieldHeader")
   private boolean header;
 
-  public String getName() {
-    return name;
-  }
-
-  public void setName(String name) {
-    this.name = name;
-  }
-
-  public String getParameter() {
-    return parameter;
-  }
-
-  public void setParameter(String parameter) {
-    this.parameter = parameter;
-  }
-
-  public boolean isHeader() {
-    return header;
-  }
-
-  public void setHeader(boolean header) {
-    this.header = header;
-  }
-
   public HttpPostArgumentField(String name, String parameter, boolean header) {
     this.name = name;
     this.parameter = parameter;
@@ -71,8 +51,12 @@ public class HttpPostArgumentField {
 
   @Override
   public boolean equals(Object o) {
-    if (this == o) return true;
-    if (o == null || getClass() != o.getClass()) return false;
+    if (this == o) {
+      return true;
+    }
+    if (o == null || getClass() != o.getClass()) {
+      return false;
+    }
     HttpPostArgumentField that = (HttpPostArgumentField) o;
     return header == that.header
         && Objects.equals(name, that.name)
diff --git 
a/plugins/transforms/httppost/src/main/java/org/apache/hop/pipeline/transforms/httppost/HttpPostDialog.java
 
b/plugins/transforms/httppost/src/main/java/org/apache/hop/pipeline/transforms/httppost/HttpPostDialog.java
index c059b544d9..c7586213a1 100644
--- 
a/plugins/transforms/httppost/src/main/java/org/apache/hop/pipeline/transforms/httppost/HttpPostDialog.java
+++ 
b/plugins/transforms/httppost/src/main/java/org/apache/hop/pipeline/transforms/httppost/HttpPostDialog.java
@@ -456,7 +456,7 @@ public class HttpPostDialog extends BaseTransformDialog {
     fdFields.left = new FormAttachment(0, 0);
     fdFields.top = new FormAttachment(wlFields, margin);
     fdFields.right = new FormAttachment(wGetBodyParam, -margin);
-    fdFields.bottom = new FormAttachment(wlFields, 200);
+    fdFields.bottom = new FormAttachment(wlFields, 300);
     wFields.setLayoutData(fdFields);
     return wGetBodyParam;
   }
diff --git 
a/plugins/transforms/httppost/src/main/java/org/apache/hop/pipeline/transforms/httppost/HttpPostLookupField.java
 
b/plugins/transforms/httppost/src/main/java/org/apache/hop/pipeline/transforms/httppost/HttpPostLookupField.java
index b98b2eea7d..dba0f5c05e 100644
--- 
a/plugins/transforms/httppost/src/main/java/org/apache/hop/pipeline/transforms/httppost/HttpPostLookupField.java
+++ 
b/plugins/transforms/httppost/src/main/java/org/apache/hop/pipeline/transforms/httppost/HttpPostLookupField.java
@@ -19,8 +19,12 @@ package org.apache.hop.pipeline.transforms.httppost;
 
 import java.util.ArrayList;
 import java.util.List;
+import lombok.Getter;
+import lombok.Setter;
 import org.apache.hop.metadata.api.HopMetadataProperty;
 
+@Setter
+@Getter
 public class HttpPostLookupField {
 
   @HopMetadataProperty(
@@ -33,22 +37,6 @@ public class HttpPostLookupField {
       injectionGroupDescription = "HTTPPOST.Injection.LookupArgumentField")
   private List<HttpPostArgumentField> argumentField = new ArrayList<>();
 
-  public List<HttpPostQuery> getQueryField() {
-    return queryField;
-  }
-
-  public void setQueryField(List<HttpPostQuery> queryField) {
-    this.queryField = queryField;
-  }
-
-  public List<HttpPostArgumentField> getArgumentField() {
-    return argumentField;
-  }
-
-  public void setArgumentField(List<HttpPostArgumentField> argumentField) {
-    this.argumentField = argumentField;
-  }
-
   public HttpPostLookupField(
       List<HttpPostQuery> postQuery, List<HttpPostArgumentField> 
argumentField) {
     this.queryField = postQuery;
diff --git 
a/plugins/transforms/httppost/src/main/java/org/apache/hop/pipeline/transforms/httppost/HttpPostMeta.java
 
b/plugins/transforms/httppost/src/main/java/org/apache/hop/pipeline/transforms/httppost/HttpPostMeta.java
index d1d85ca308..06d99d1145 100644
--- 
a/plugins/transforms/httppost/src/main/java/org/apache/hop/pipeline/transforms/httppost/HttpPostMeta.java
+++ 
b/plugins/transforms/httppost/src/main/java/org/apache/hop/pipeline/transforms/httppost/HttpPostMeta.java
@@ -19,6 +19,8 @@ package org.apache.hop.pipeline.transforms.httppost;
 
 import java.util.ArrayList;
 import java.util.List;
+import lombok.Getter;
+import lombok.Setter;
 import org.apache.hop.core.CheckResult;
 import org.apache.hop.core.ICheckResult;
 import org.apache.hop.core.annotations.Transform;
@@ -36,6 +38,8 @@ import org.apache.hop.pipeline.PipelineMeta;
 import org.apache.hop.pipeline.transform.BaseTransformMeta;
 import org.apache.hop.pipeline.transform.TransformMeta;
 
+@Setter
+@Getter
 @Transform(
     id = "HttpPost",
     image = "httppost.svg",
@@ -118,144 +122,6 @@ public class HttpPostMeta extends 
BaseTransformMeta<HttpPost, HttpPostData> {
     super(); // allocate BaseTransformMeta
   }
 
-  public String getEncoding() {
-    return encoding;
-  }
-
-  public void setEncoding(String encoding) {
-    this.encoding = encoding;
-  }
-
-  /**
-   * @return Returns the connectionTimeout.
-   */
-  public String getConnectionTimeout() {
-    return connectionTimeout;
-  }
-
-  /**
-   * @param connectionTimeout The connectionTimeout to set.
-   */
-  public void setConnectionTimeout(String connectionTimeout) {
-    this.connectionTimeout = connectionTimeout;
-  }
-
-  /**
-   * @return Returns the closeIdleConnectionsTime.
-   */
-  public String getCloseIdleConnectionsTime() {
-    return closeIdleConnectionsTime;
-  }
-
-  /**
-   * @param closeIdleConnectionsTime The connectionTimeout to set.
-   */
-  public void setCloseIdleConnectionsTime(String closeIdleConnectionsTime) {
-    this.closeIdleConnectionsTime = closeIdleConnectionsTime;
-  }
-
-  /**
-   * @return Returns the socketTimeout.
-   */
-  public String getSocketTimeout() {
-    return socketTimeout;
-  }
-
-  /**
-   * @param socketTimeout The socketTimeout to set.
-   */
-  public void setSocketTimeout(String socketTimeout) {
-    this.socketTimeout = socketTimeout;
-  }
-
-  /**
-   * @return Returns the procedure.
-   */
-  public String getUrl() {
-    return url;
-  }
-
-  /**
-   * @param procedure The procedure to set.
-   */
-  public void setUrl(String procedure) {
-    this.url = procedure;
-  }
-
-  /**
-   * @return Is the url coded in a field?
-   */
-  public boolean isUrlInField() {
-    return urlInField;
-  }
-
-  public boolean isPostAFile() {
-    return postAFile;
-  }
-
-  public void setPostAFile(boolean postafile) {
-    this.postAFile = postafile;
-  }
-
-  public boolean isMultipartupload() {
-    return multipartupload;
-  }
-
-  public void setMultipartupload(boolean multipartupload) {
-    this.multipartupload = multipartupload;
-  }
-
-  /**
-   * @param urlInField Is the url coded in a field?
-   */
-  public void setUrlInField(boolean urlInField) {
-    this.urlInField = urlInField;
-  }
-
-  /**
-   * @return The field name that contains the url.
-   */
-  public String getUrlField() {
-    return urlField;
-  }
-
-  /**
-   * @param urlField name of the field that contains the url
-   */
-  public void setUrlField(String urlField) {
-    this.urlField = urlField;
-  }
-
-  /**
-   * @param requestEntity the requestEntity to set
-   */
-  public void setRequestEntity(String requestEntity) {
-    this.requestEntity = requestEntity;
-  }
-
-  /**
-   * @return requestEntity
-   */
-  public String getRequestEntity() {
-    return requestEntity;
-  }
-
-  public List<HttpPostLookupField> getLookupFields() {
-    return lookupFields;
-  }
-
-  public void setLookupFields(List<HttpPostLookupField> lookupFields) {
-    this.lookupFields = lookupFields;
-  }
-
-  public List<HttpPostResultField> getResultFields() {
-    return resultFields;
-  }
-
-  public void setResultFields(List<HttpPostResultField> resultFields) {
-    this.resultFields = resultFields;
-  }
-
   @Override
   public Object clone() {
     HttpPostMeta retval = (HttpPostMeta) super.clone();
@@ -375,82 +241,4 @@ public class HttpPostMeta extends 
BaseTransformMeta<HttpPost, HttpPostData> {
   public boolean supportsErrorHandling() {
     return true;
   }
-
-  /**
-   * ISetter
-   *
-   * @param proxyHost
-   */
-  public void setProxyHost(String proxyHost) {
-    this.proxyHost = proxyHost;
-  }
-
-  /**
-   * IGetter
-   *
-   * @return
-   */
-  public String getProxyHost() {
-    return proxyHost;
-  }
-
-  /**
-   * ISetter
-   *
-   * @param proxyPort
-   */
-  public void setProxyPort(String proxyPort) {
-    this.proxyPort = proxyPort;
-  }
-
-  /**
-   * IGetter
-   *
-   * @return
-   */
-  public String getProxyPort() {
-    return this.proxyPort;
-  }
-
-  /**
-   * ISetter
-   *
-   * @param httpLogin
-   */
-  public void setHttpLogin(String httpLogin) {
-    this.httpLogin = httpLogin;
-  }
-
-  /**
-   * IGetter
-   *
-   * @return
-   */
-  public String getHttpLogin() {
-    return httpLogin;
-  }
-
-  /**
-   * ISetter
-   *
-   * @param httpPassword
-   */
-  public void setHttpPassword(String httpPassword) {
-    this.httpPassword = httpPassword;
-  }
-
-  /**
-   * @return
-   */
-  public String getHttpPassword() {
-    return httpPassword;
-  }
-
-  public boolean isIgnoreSsl() {
-    return ignoreSsl;
-  }
-
-  public void setIgnoreSsl(boolean ignoreSsl) {
-    this.ignoreSsl = ignoreSsl;
-  }
 }
diff --git 
a/plugins/transforms/httppost/src/main/java/org/apache/hop/pipeline/transforms/httppost/HttpPostQuery.java
 
b/plugins/transforms/httppost/src/main/java/org/apache/hop/pipeline/transforms/httppost/HttpPostQuery.java
index 9aca43ff58..4feb1f2d31 100644
--- 
a/plugins/transforms/httppost/src/main/java/org/apache/hop/pipeline/transforms/httppost/HttpPostQuery.java
+++ 
b/plugins/transforms/httppost/src/main/java/org/apache/hop/pipeline/transforms/httppost/HttpPostQuery.java
@@ -18,8 +18,12 @@
 package org.apache.hop.pipeline.transforms.httppost;
 
 import java.util.Objects;
+import lombok.Getter;
+import lombok.Setter;
 import org.apache.hop.metadata.api.HopMetadataProperty;
 
+@Setter
+@Getter
 public class HttpPostQuery {
 
   @HopMetadataProperty(injectionKeyDescription = 
"HTTPPOST.Injection.QueryFieldName")
@@ -28,22 +32,6 @@ public class HttpPostQuery {
   @HopMetadataProperty(injectionKeyDescription = 
"HTTPPOST.Injection.QueryFieldParameter")
   private String parameter;
 
-  public String getName() {
-    return name;
-  }
-
-  public void setName(String name) {
-    this.name = name;
-  }
-
-  public String getParameter() {
-    return parameter;
-  }
-
-  public void setParameter(String parameter) {
-    this.parameter = parameter;
-  }
-
   public HttpPostQuery(String name, String parameter) {
     this.name = name;
     this.parameter = parameter;
@@ -58,8 +46,12 @@ public class HttpPostQuery {
 
   @Override
   public boolean equals(Object o) {
-    if (this == o) return true;
-    if (o == null || getClass() != o.getClass()) return false;
+    if (this == o) {
+      return true;
+    }
+    if (o == null || getClass() != o.getClass()) {
+      return false;
+    }
     HttpPostQuery that = (HttpPostQuery) o;
     return Objects.equals(name, that.name) && Objects.equals(parameter, 
that.parameter);
   }
diff --git 
a/plugins/transforms/httppost/src/main/java/org/apache/hop/pipeline/transforms/httppost/HttpPostResultField.java
 
b/plugins/transforms/httppost/src/main/java/org/apache/hop/pipeline/transforms/httppost/HttpPostResultField.java
index 04b0b7163f..6d4705877a 100644
--- 
a/plugins/transforms/httppost/src/main/java/org/apache/hop/pipeline/transforms/httppost/HttpPostResultField.java
+++ 
b/plugins/transforms/httppost/src/main/java/org/apache/hop/pipeline/transforms/httppost/HttpPostResultField.java
@@ -18,8 +18,12 @@
 package org.apache.hop.pipeline.transforms.httppost;
 
 import java.util.Objects;
+import lombok.Getter;
+import lombok.Setter;
 import org.apache.hop.metadata.api.HopMetadataProperty;
 
+@Setter
+@Getter
 public class HttpPostResultField {
 
   @HopMetadataProperty(injectionKeyDescription = 
"HTTPPOST.Injection.ResultFieldCode")
@@ -38,38 +42,6 @@ public class HttpPostResultField {
       injectionKeyDescription = "HTTPPOST.Injection.ResultFieldResponseHeader")
   private String responseHeaderFieldName;
 
-  public String getCode() {
-    return code;
-  }
-
-  public void setCode(String code) {
-    this.code = code;
-  }
-
-  public String getName() {
-    return name;
-  }
-
-  public void setName(String name) {
-    this.name = name;
-  }
-
-  public String getResponseTimeFieldName() {
-    return responseTimeFieldName;
-  }
-
-  public void setResponseTimeFieldName(String responseTimeFieldName) {
-    this.responseTimeFieldName = responseTimeFieldName;
-  }
-
-  public String getResponseHeaderFieldName() {
-    return responseHeaderFieldName;
-  }
-
-  public void setResponseHeaderFieldName(String responseHeaderFieldName) {
-    this.responseHeaderFieldName = responseHeaderFieldName;
-  }
-
   public HttpPostResultField(
       String code, String name, String responseTimeFieldName, String 
responseHeaderFieldName) {
     this.code = code;
@@ -91,8 +63,12 @@ public class HttpPostResultField {
 
   @Override
   public boolean equals(Object o) {
-    if (this == o) return true;
-    if (o == null || getClass() != o.getClass()) return false;
+    if (this == o) {
+      return true;
+    }
+    if (o == null || getClass() != o.getClass()) {
+      return false;
+    }
     HttpPostResultField that = (HttpPostResultField) o;
     return Objects.equals(code, that.code)
         && Objects.equals(name, that.name)

Reply via email to