I have some undisciplined samples [1] in Groovy with HttpBuilder, also
you could use httplib in Python [2] (some 2.4-based examples at [3]).
For Java you can use OkHttp [4] as some of the NiFi processors do, or
Apache HttpComponents (example [5]), etc.

Regards,
Matt

[1] 
https://github.com/mattyb149/nifi-client/tree/master/src/main/groovy/nifi/client
[2] https://docs.python.org/2/library/httplib.html
[3] https://docs.python.org/2.4/lib/httplib-examples.html
[4] http://square.github.io/okhttp/
[5] http://stackoverflow.com/questions/3324717/sending-http-post-request-in-java

On Mon, Sep 5, 2016 at 7:29 PM, James McMahon <[email protected]> wrote:
> Thank you Matt. This helps me configure NiFi to field the request. Is there
> an example you can point me towards that shows how to build, issue, and send
> such a request - in Python or java, for example?
>
> On Sun, Sep 4, 2016 at 8:22 AM, Matt Burgess <[email protected]> wrote:
>>
>> James,
>>
>> For simple calls that return immediately, ListenHttp probably works
>> fine. For more flexible and powerful processing of HTTP requests (and
>> responses), you might be better off with HandleHttpRequest and
>> HandleHttpResponse. There is an example of this under
>> Hello_NiFi_Web_Service [1].
>>
>> Regards,
>> Matt
>>
>> [1]
>> https://cwiki.apache.org/confluence/display/NIFI/Example+Dataflow+Templates
>>
>> On Sun, Sep 4, 2016 at 7:40 AM, James McMahon <[email protected]>
>> wrote:
>> > I have a series of applications, each of which I need to redesign so
>> > that
>> > they post raw data to NiFi. Is there an example showing how to to
>> > construct
>> > and execute RESTful calls that push data to NiFi? My assumption is that
>> > I
>> > would establish a ListenHTTP processor in my workflow to receive the
>> > incoming content. Is that correct, or should this be handled
>> > differently? My
>> > apps are in java and are simple, so I can readily port them to nodeJS,
>> > Python, Groovy, etc. Thanks in advance for your help.
>
>

Reply via email to