Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

get response from InvokeHTTP POST

Tags:

apache-nifi

New to NiFi!

I'm using InvokeHTTP nifi processor (using this link as an example to implement my flow http://www.tomaszezula.com/2016/10/30/nifi-and-http-post-configuration/). I currently need to do POST in order to authenticate against a server I am using. I am able to POST successfully. However, I need to be able to get the data returned from the response of the POST that was executed. When I look at InvokeHTTPs output into the success queue all I see is the body which I had posted. Is there anyway for me to get the response into a flowfile?

Thanks in advance!

like image 700
BigBug Avatar asked May 16 '17 18:05

BigBug


1 Answers

Apache NiFi's InvokeHTTP processor sends the response content to a separate relationship from the original flowfile. You will want to separately route this response relationship.

InvokeHTTP response relationship

InvokeHTTP also has a Put Response Body In Attribute property, which you can set to capture the response as a attribute, rather than a separate flowfile. This might be useful for an auth token.

like image 84
James Avatar answered Oct 17 '22 08:10

James