This is an automated email from the ASF dual-hosted git repository.
exceptionfactory pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/main by this push:
new d1b77018b2 NIFI-11934 Allow FlowFile filename to be sent in header for
InvokeHTTP
d1b77018b2 is described below
commit d1b77018b2759454c83e536e1bd07db39375c155
Author: Mark Bean <[email protected]>
AuthorDate: Wed Aug 23 11:55:22 2023 -0400
NIFI-11934 Allow FlowFile filename to be sent in header for InvokeHTTP
This closes #7639
Signed-off-by: David Handermann <[email protected]>
---
.../org/apache/nifi/processors/standard/InvokeHTTP.java | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java
index 2fb469e4d4..384f009f82 100644
---
a/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java
+++
b/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/InvokeHTTP.java
@@ -130,7 +130,8 @@ import static
org.apache.commons.lang3.StringUtils.trimToEmpty;
@Tags({"http", "https", "rest", "client"})
@InputRequirement(Requirement.INPUT_ALLOWED)
@CapabilityDescription("An HTTP client processor which can interact with a
configurable HTTP Endpoint. The destination URL and HTTP Method are
configurable."
- + " FlowFile attributes are converted to HTTP headers and the FlowFile
contents are included as the body of the request (if the HTTP Method is PUT,
POST or PATCH).")
+ + " When the HTTP Method is PUT, POST or PATCH, the FlowFile contents
are included as the body of the request and FlowFile attributes are converted"
+ + " to HTTP headers, optionally, based on configuration properties.")
@WritesAttributes({
@WritesAttribute(attribute = InvokeHTTP.STATUS_CODE, description =
"The status code that is returned"),
@WritesAttribute(attribute = InvokeHTTP.STATUS_MESSAGE, description =
"The status message that is returned"),
@@ -185,7 +186,6 @@ public class InvokeHTTP extends AbstractProcessor {
EXCEPTION_CLASS,
EXCEPTION_MESSAGE,
CoreAttributes.UUID.key(),
- CoreAttributes.FILENAME.key(),
CoreAttributes.PATH.key()
)));
@@ -391,10 +391,11 @@ public class InvokeHTTP extends AbstractProcessor {
public static final PropertyDescriptor REQUEST_HEADER_ATTRIBUTES_PATTERN =
new PropertyDescriptor.Builder()
.name("Attributes to Send")
.displayName("Request Header Attributes Pattern")
- .description("Regular expression that defines which attributes to
send as HTTP headers in the request. "
- + "If not defined, no attributes are sent as headers.
Dynamic properties will be sent as headers. "
- + "The dynamic property name will be the header key and
the dynamic property value will be interpreted as expression "
- + "language will be the header value.")
+ .description("Regular expression that defines which FlowFile
attributes to send as HTTP headers in the request. "
+ + "If not defined, no attributes are sent as headers.
Dynamic properties will be always be sent as headers. "
+ + "The dynamic property name will be the header key and
the dynamic property value, interpreted as Expression "
+ + "Language, will be the header value. Attributes and
their values are limited to ASCII characters due to "
+ + "the requirement of the HTTP protocol.")
.required(false)
.addValidator(StandardValidators.REGULAR_EXPRESSION_VALIDATOR)
.build();