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!