Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E2FCE200C1D for ; Thu, 2 Feb 2017 02:42:59 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id E0F6A160B5E; Thu, 2 Feb 2017 01:42:59 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 37ACC160B46 for ; Thu, 2 Feb 2017 02:42:59 +0100 (CET) Received: (qmail 98417 invoked by uid 500); 2 Feb 2017 01:42:58 -0000 Mailing-List: contact issues-help@nifi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nifi.apache.org Delivered-To: mailing list issues@nifi.apache.org Received: (qmail 98408 invoked by uid 99); 2 Feb 2017 01:42:58 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Feb 2017 01:42:58 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id E1E95C111E for ; Thu, 2 Feb 2017 01:42:57 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.999 X-Spam-Level: X-Spam-Status: No, score=-1.999 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id SGYm9-tDPbxX for ; Thu, 2 Feb 2017 01:42:57 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 0E5F45F177 for ; Thu, 2 Feb 2017 01:42:57 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id CE9AEE01D8 for ; Thu, 2 Feb 2017 01:42:51 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 8C2C125286 for ; Thu, 2 Feb 2017 01:42:51 +0000 (UTC) Date: Thu, 2 Feb 2017 01:42:51 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@nifi.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (NIFI-819) Allow specification of headers for GetHTTP MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 02 Feb 2017 01:43:00 -0000 [ https://issues.apache.org/jira/browse/NIFI-819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15849256#comment-15849256 ] ASF GitHub Bot commented on NIFI-819: ------------------------------------- Github user trixpan commented on a diff in the pull request: https://github.com/apache/nifi/pull/1462#discussion_r99038757 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetHTTP.java --- @@ -467,6 +486,18 @@ public void onTrigger(final ProcessContext context, final ProcessSessionFactory if (accept != null) { get.addHeader(HEADER_ACCEPT, accept); } + + // Add dynamic headers + + PropertyValue customHeaderValue; + for (PropertyDescriptor customProperty : customHeaders) { + customHeaderValue = context.getProperty(customProperty).evaluateAttributeExpressions(); + if (StringUtils.isNotBlank(customHeaderValue.getValue())) { --- End diff -- I was working under two assumptions: * onScheduled is called once per scheduling; * in theory use time related expression language even if incoming flowfiles were to be absent Does it make sense? > Allow specification of headers for GetHTTP > ------------------------------------------ > > Key: NIFI-819 > URL: https://issues.apache.org/jira/browse/NIFI-819 > Project: Apache NiFi > Issue Type: Improvement > Components: Extensions > Affects Versions: 0.2.1 > Reporter: Aldrin Piri > Assignee: Andre > Priority: Minor > Fix For: 1.2.0 > > > There is currently no way to provide additional headers for requests through GetHTTP. Some endpoints may require a token or other information to access information. Currently, it is possible to work around this with an InvokeHttp driven by a dummy file, but interpretation of dynamic properties added as additional headers would provide a better option. -- This message was sent by Atlassian JIRA (v6.3.15#6346)