Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Can NiFi InvokeHTTP handle Cookies?

Can NiFi InvokeHTTP handle Cookies?

New Contributor

I use an InvokeHTTP processor to POST login details to a website

This returns a Set-Cookie attribute

Then I use another InvokeHTTP to request some JSON from a REST endpoint. I have created a Cookie attribute as ${Set-Cookie:substringBefore(';')} and added Cookie to "Attributes to Send" to use it as an HTTP header.

The problem is that this 2nd InvokeHTTP fails authentication and returns a 401.

If I manually log in and copy the Cookie value to the 2nd InvokeHTTP's parameters, the call works. In either case the Data provenance shows a valid Cookie value but the call always returns a 401 when the value comes from the dynamic value, so I am a bit lost.