Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 11-25-2016 05:58 PM
Hi, Im using Apache Nifi , and I'm trying to send an HTTP POST request to my server API, my API needs a custom header in the HTTP Headers part like the following :
API-KEY : secret-key
How can I add this custome header in my POSTHTTP processor ?
Created 11-26-2016 02:34 PM
If you use InvokeHTTP (with HTTP Method property set to PUT), the property Attributes to Send will send attributes as headers in the HTTP request. (You may have to use UpdateAttribute processor to set the attributes).
https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.standard.InvokeHTTP/
If this is what you are looking for, let me know by accepting the answer; else, let me know of any gaps or follow-up questions.
Created 11-26-2016 02:34 PM
If you use InvokeHTTP (with HTTP Method property set to PUT), the property Attributes to Send will send attributes as headers in the HTTP request. (You may have to use UpdateAttribute processor to set the attributes).
https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.standard.InvokeHTTP/
If this is what you are looking for, let me know by accepting the answer; else, let me know of any gaps or follow-up questions.
Created 08-04-2017 12:36 PM
How did you manage to implement this? I've tried with the invokeHTTP with POST, GET and PUT with update attributes as an input sending the value for Headers to the invokeHTTP but it doesnt appear to work, I have put a proxy inline and that also never sees the headers being sent? I am trying to access the alientvault API, their example is
curl https://otx.alienvault.com:443/api/v1/pulses/subscribed?page=1 -H "X-OTX-API-KEY: LONGKEYHASHGOESHERE"
Or am I over thinking this and there is an easy way using getHTTP?
Created 08-04-2017 12:44 PM