10

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!

BigBug
  • 6,202
  • 23
  • 87
  • 138

1 Answers1

16

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.

Community
  • 1
  • 1
James
  • 11,721
  • 2
  • 35
  • 41
  • Sorry I just have a related problem about this. How to set proper attribute name of it, Thank you. https://stackoverflow.com/questions/57760560/name-of-attribute-for-put-response-body-in-attribute-in-invokehttp – Chandler.Huang Sep 02 '19 at 17:15