- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Post HTTP Attributes to Send as HTTP Headers (Regex)
- Labels:
-
Apache NiFi
Created 11-25-2016 05:58 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
