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 09-08-2016 08:39 PM
The web service I'm calling requires the Content-Type header to be set to application/json, but it appears the InvokeHttp processor only sets this header if it is a POST or PUT request. Is there any way to set this header for GET requests?
Created 09-08-2016 09:32 PM
Thanks for the answer. What you posted didn't work, but I did play with and eventually got it. What I had to do was have an UpdateAttribute processor before my InvokeHTTP that sets an attribute called "Content-Type", then in InvokeHTTP, set "attributes to send" to "Content-Type" and it worked.
Thanks!
Created on 09-08-2016 09:17 PM - edited 08-19-2019 01:05 AM
Have you looked at adding a dynamic property? If you take a look here: https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.standard.InvokeHTTP/
"Attributes to send" is where you will want this. So in your nifi processor it should look like the image attached, can you try that?
Created 09-08-2016 09:32 PM
Thanks for the answer. What you posted didn't work, but I did play with and eventually got it. What I had to do was have an UpdateAttribute processor before my InvokeHTTP that sets an attribute called "Content-Type", then in InvokeHTTP, set "attributes to send" to "Content-Type" and it worked.
Thanks!
Created on 04-24-2026 05:05 AM - edited 04-24-2026 05:08 AM
Do you know how to retrieve the content type from the message properties when using ConsumeJMS?