From the course: Data Management with Apache NiFi

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Configuring an InvokeHTTP processor

Configuring an InvokeHTTP processor - Apache NiFi Tutorial

From the course: Data Management with Apache NiFi

Configuring an InvokeHTTP processor

In this final data flow that we'll be building in this course, we'll read from an HTTP API, parse the response, and write the response out to files. The API that we'll hit is HTTPS PoetryDB.org forward slash random. Each time you hit refresh on this API, you'll get the details of a different poem, the title, the author, and a few lines from that poem. These are the details that we'll parse and write out to a file. In order to be able to make a GET request to an API and read its response, we'll use the Invoke HTTP processor. So let's add a new processor to our canvas. In the dialog that comes up, search for Invoke HTTP. This allows you to make all kinds of HTTP requests, GET, PUT, POST, and so on. We'll be making GET requests, so let's configure this processor. Now let's head over to scheduling. I'm going to have it run every 40 seconds, so that we are not constantly pounding that URL. Next, we'll head over to the Properties tab and Configure Properties. The HTTP method that we use to…

Contents