Support Questions

Find answers, ask questions, and share your expertise

how to user nifi HadleHttpRequest and HandleHttpResponse

avatar
New Contributor

When requested by http, run jar, and jar creates a file. The problem is that I want to import the generated file into "ListFile" and send the file to the "HandleHttpResponse" processor. What do you think I ought to do?

1 REPLY 1

avatar
Master Mentor

@has 

 

The listFile processor does not accept an inbound connection.  If you know the filename of the file being created and the path where that file is created, all you need is the FetchFile processor.

handleHTTPRequest --->  <flow to execute jar> --> updateAttribute (set path and filename attributes) --> FetchFile --> handleHttpRequest --> <rest of dataflow>

The handleHttpRequest processor does not return content.  It simply returns a response code back to for the original request which has not yet been responded to.  The only thing you have control over in the response is the status code sent and sending custom headers in the response.

Hope this helps,
Matt