You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hop.apache.org by ha...@apache.org on 2022/02/15 19:28:29 UTC
[hop] branch master updated: HOP-3745: fix query parameters in http client (#1370)
This is an automated email from the ASF dual-hosted git repository.
hansva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hop.git
The following commit(s) were added to refs/heads/master by this push:
new 830128d HOP-3745: fix query parameters in http client (#1370)
830128d is described below
commit 830128d74841259afb2e5ae6d5d318bf06ef0b14
Author: Hans Van Akelyen <ha...@gmail.com>
AuthorDate: Tue Feb 15 20:28:23 2022 +0100
HOP-3745: fix query parameters in http client (#1370)
---
.../main/java/org/apache/hop/pipeline/transforms/http/Http.java | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/plugins/transforms/http/src/main/java/org/apache/hop/pipeline/transforms/http/Http.java b/plugins/transforms/http/src/main/java/org/apache/hop/pipeline/transforms/http/Http.java
index f42583b..d18e61a 100644
--- a/plugins/transforms/http/src/main/java/org/apache/hop/pipeline/transforms/http/Http.java
+++ b/plugins/transforms/http/src/main/java/org/apache/hop/pipeline/transforms/http/Http.java
@@ -269,11 +269,9 @@ public class Http extends BaseTransform<HttpMeta, HttpData>
for (int i = 0; i < data.argnrs.length; i++) {
String key = meta.getArgumentParameter()[i];
String value = outputRowMeta.getString(row, data.argnrs[i]);
- BasicNameValuePair basicNameValuePair = new BasicNameValuePair(key, value);
- queryParams.add(basicNameValuePair);
- }
- if (!queryParams.isEmpty()) {
- uriBuilder.setParameters(queryParams);
+ if (!key.isEmpty() && !value.isEmpty()) {
+ uriBuilder.addParameter(key, value);
+ }
}
} catch (Exception e) {
throw new HopException(BaseMessages.getString(PKG, "HTTP.Log.UnableCreateUrl"), e);