- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How to send json body to Apache NiFi InvokeHTTP
- Labels:
-
Apache NiFi
Created ‎05-25-2023 11:42 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have an InvokeHTTP processor Apache NiFi, I need to send a curl request with this content
curl https://reqbin.com/echo/post/json
-X POST
-H 'Content-Type: application/json'
-d '{
"login": "my_login",
"password":"my_password"
}'
I can't figure out what to do -d
Created ‎05-26-2023 07:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
The request Body has to be provided as flowfile to the InvokeHttp Processor per the processor description:
You can use an upstream processor to the InvokeHttp like ReplaceText processor to generate the request body a follows:
To send incoming flowfile content as Request Body , make sure the following property of the invokehttp processor is set to true (default):
To make sure you are always getting a response no matter if its successful or not make sure to set the following invokehttp processor to true (default false):
If that helps please accept solution.
Thanks
