<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Setting custom Http headers with HandleHttpResponse in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Setting-custom-Http-headers-with-HandleHttpResponse/m-p/138305#M56200</link>
    <description>&lt;P&gt;Hello &lt;A rel="user" href="https://community.cloudera.com/users/16441/byhisdeeds.html" nodeid="16441" target="_blank"&gt;@John Preston&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Yes, it's possible to pass custom HTT headers from HandleHttpResponse via dynamic properties. At HandleHttpResponse processor configuration tab, you can add a dynamic property by clicking the 'plus' sign, then enter its name which will be a name of the custom HTTP header, and specify a NiFi Attribute Expression Language (EL) as its value. You can find more about EL here &lt;A href="https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html" rel="nofollow noopener noreferrer" target="_blank"&gt;NiFi Expression Language Guide&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="13262-handlehttpresponse.png" style="width: 1532px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/21919i784AE4E84EF6B0F0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="13262-handlehttpresponse.png" alt="13262-handlehttpresponse.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Test sending a HTTP request via cURL command:&lt;/P&gt;&lt;PRE&gt;$ curl -i localhost:8081
HTTP/1.1 200 OK
Date: Sun, 05 Mar 2017 23:26:00 GMT
NiFi FileName: 100866877045484
Transfer-Encoding: chunked
Server: Jetty(9.3.9.v20160517)
{"Result": "OK"}
&lt;/PRE&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Koji&lt;/P&gt;</description>
    <pubDate>Mon, 19 Aug 2019 08:38:27 GMT</pubDate>
    <dc:creator>kkawamura</dc:creator>
    <dc:date>2019-08-19T08:38:27Z</dc:date>
    <item>
      <title>Setting custom Http headers with HandleHttpResponse</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Setting-custom-Http-headers-with-HandleHttpResponse/m-p/138304#M56199</link>
      <description>&lt;P&gt;I have a flow that starts with an HandleHttpRequest and passes through a custom processor then ends with a HandleHttpResponse to manage a web request. I need to set some custom HTTP headers in the response based on flowfile attributes available to the HandleHttpResponse processor. I can't for the life of me figure out how to get them set although google searches keep givng me the impression that its possible with dynamic properties, but I can't find any examples. The flow is working and I'm able to see attributes I set, and the flow file contents are received back on the browser. However I would prefer to set some headers in the response instead of capturing the data in the browser and setting the headers there.&lt;/P&gt;&lt;P&gt;Can anyone help me out with some pointers on what to try&lt;/P&gt;</description>
      <pubDate>Sun, 05 Mar 2017 22:55:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Setting-custom-Http-headers-with-HandleHttpResponse/m-p/138304#M56199</guid>
      <dc:creator>byhisdeeds</dc:creator>
      <dc:date>2017-03-05T22:55:57Z</dc:date>
    </item>
    <item>
      <title>Re: Setting custom Http headers with HandleHttpResponse</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Setting-custom-Http-headers-with-HandleHttpResponse/m-p/138305#M56200</link>
      <description>&lt;P&gt;Hello &lt;A rel="user" href="https://community.cloudera.com/users/16441/byhisdeeds.html" nodeid="16441" target="_blank"&gt;@John Preston&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Yes, it's possible to pass custom HTT headers from HandleHttpResponse via dynamic properties. At HandleHttpResponse processor configuration tab, you can add a dynamic property by clicking the 'plus' sign, then enter its name which will be a name of the custom HTTP header, and specify a NiFi Attribute Expression Language (EL) as its value. You can find more about EL here &lt;A href="https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html" rel="nofollow noopener noreferrer" target="_blank"&gt;NiFi Expression Language Guide&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="13262-handlehttpresponse.png" style="width: 1532px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/21919i784AE4E84EF6B0F0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="13262-handlehttpresponse.png" alt="13262-handlehttpresponse.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Test sending a HTTP request via cURL command:&lt;/P&gt;&lt;PRE&gt;$ curl -i localhost:8081
HTTP/1.1 200 OK
Date: Sun, 05 Mar 2017 23:26:00 GMT
NiFi FileName: 100866877045484
Transfer-Encoding: chunked
Server: Jetty(9.3.9.v20160517)
{"Result": "OK"}
&lt;/PRE&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Koji&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 08:38:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Setting-custom-Http-headers-with-HandleHttpResponse/m-p/138305#M56200</guid>
      <dc:creator>kkawamura</dc:creator>
      <dc:date>2019-08-19T08:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: Setting custom Http headers with HandleHttpResponse</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Setting-custom-Http-headers-with-HandleHttpResponse/m-p/138306#M56201</link>
      <description>&lt;P&gt;Thanks for the answer.  I was missing the add property button because I was always viewing the HandleHttpResponse processor configuration while the processor was active, and in that mode the add property button (+) wasn't shown. Once I stopped the processor and selected the configuration option, I saw the add property (+) button which was what I was missing and couldn't figure out how to access. Its working now. Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2017 07:40:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Setting-custom-Http-headers-with-HandleHttpResponse/m-p/138306#M56201</guid>
      <dc:creator>byhisdeeds</dc:creator>
      <dc:date>2017-03-06T07:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: Setting custom Http headers with HandleHttpResponse</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Setting-custom-Http-headers-with-HandleHttpResponse/m-p/138307#M56202</link>
      <description>&lt;P&gt;Glad to hear you figured it out. Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2017 07:43:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Setting-custom-Http-headers-with-HandleHttpResponse/m-p/138307#M56202</guid>
      <dc:creator>kkawamura</dc:creator>
      <dc:date>2017-03-06T07:43:24Z</dc:date>
    </item>
  </channel>
</rss>

