Github user nickcarenza commented on a diff in the pull request:
https://github.com/apache/nifi/pull/1395#discussion_r113246581
--- Diff:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PostHTTP.java
---
@@ -880,6 +936,29 @@ public long getContentLength() {
}
}
+ private FlowFile appendResponseData(final ProcessContext context,
final ProcessSession session, final FlowFile original, String responseBody, int
statusCode, String mimeType) {
+ FlowFile appended = original;
+ switch (context.getProperty(RESPONSE_BODY_DESTINATION).getValue())
{
+ case DESTINATION_ATTRIBUTE:
+ if (context.getProperty(RESPONSE_BODY_ATTRIBUTE).isSet()) {
+ appended = session.putAttribute(appended,
context.getProperty(RESPONSE_BODY_ATTRIBUTE).getValue(), responseBody);
+ } else {
+ getLogger().warn("{} is set to {} but {} is not set",
new
Object[]{RESPONSE_BODY_DESTINATION.getName(),DESTINATION_ATTRIBUTE,RESPONSE_BODY_ATTRIBUTE.getName()});
--- End diff --
I agree it should be detected in validation. I didn't realize properties
could be validated within the context of other properties.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---