Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

InvokeHTTP processor not working for POST

avatar
New Contributor

Hi

I have configured GET and POST processors in my Nifi project but seems i am able to run the GET calls fine but the POST one is not giving me anything.

Here are the configurations for my POST processor

Gurvinder21_0-1595285426054.png

Gurvinder21_1-1595285448374.png

 

Gurvinder21_2-1595285504743.png

Ignore the "invalid" thats showing on top of the processor, i was able to resolve that by checking all the Auto terminate checkboxes.

For the Post i am not seeing any output. The Tasks/Time is showing increasing but the "In, Read/Write, Out" are all showing 0. In view data provenance of processor, i dont see any data. How to debug what is happening in the POST processor. Also do i necessarily need to provide anything in the "Attributes to send"? i have tried empty and also tried putting "Authorization grant_type" as 2 dynamic attributes that i created and can be seen in my screenshot.

1 REPLY 1

avatar
New Contributor

i guess i made it work by adding a generate flow file processor before the InvokeHTTP processor and passed grant_type attribute from GenerateFlow File to InvokeHttp and it worked. I just want to know is this the only approach. Why cant i define the grant_type=client_credentials and pass as a body attribute in the InvokeHttp processor itself and pass to the POST like i have shown in my original screenshot. Do i have to put the GenerateFlowFile first?