ottobackwards commented on a change in pull request #4234:
URL: https://github.com/apache/nifi/pull/4234#discussion_r416054076



##########
File path: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java
##########
@@ -131,9 +135,19 @@
     @WritesAttribute(attribute = "invokehttp.java.exception.message", 
description = "The Java exception message raised when the processor fails"),
     @WritesAttribute(attribute = "user-defined", description = "If the 'Put 
Response Body In Attribute' property is set then whatever it is set to "
         + "will become the attribute key and the value would be the body of 
the HTTP response.")})
-@DynamicProperty(name = "Header Name", value = "Attribute Expression 
Language", expressionLanguageScope = 
ExpressionLanguageScope.FLOWFILE_ATTRIBUTES,
-                    description = "Send request header with a key matching the 
Dynamic Property Key and a value created by evaluating "
-                            + "the Attribute Expression Language set in the 
value of the Dynamic Property.")
+@DynamicProperties ({
+    @DynamicProperty(name = "Header Name", value = "Attribute Expression 
Language", expressionLanguageScope = 
ExpressionLanguageScope.FLOWFILE_ATTRIBUTES,
+        description =
+            "Send request header with a key matching the Dynamic Property Key 
and a value created by evaluating "
+                + "the Attribute Expression Language set in the value of the 
Dynamic Property."),
+    @DynamicProperty(name = "post.form.<NAME>", value = "Attribute Expression 
Language", expressionLanguageScope = 
ExpressionLanguageScope.FLOWFILE_ATTRIBUTES,
+        description =
+            "When the HTTP Method is POST, dynamic properties with the 
property name in the form of post.form.<NAME>,"
+                + " where the <NAME> will be the form data name, will be used 
to fill out the multipart form parts."
+                + "  If the value is the literal 'FLOWFILE_CONTENT', that form 
part will have the flowfile's data."
+                + "  The property name post.form.filename will set the 
filename to set for the flowfile content."
+                + "  If send message body is false, the properties will be 
ignored.")

Review comment:
       All post.form properties are ignored if send message body is false. That 
is more in line with how the current code worked.  I can see a logical argument 
that if there are forms set, you should send those and only let the send body 
apply to sending the flowfile.  What do you think?




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

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


Reply via email to