TransWikia.com

In Nifi processor "InvokeHttp" invoked by "ExtractText" where do you write body of POSt request

Stack Overflow Asked by user11336100 on January 1, 2022

Before posting this question about Apache NiFi InvokeHTTP and ExtractHttp I have gone through all other questions and their answers but I am still not able to write body. My situation is as below:
(1) "GetFile" Processor: gets file which has 2 URLs on separate lines
(2) "SplitText" processor: splits the 2 URLs
(3) "ExtractText" processor: assigns URL to a property I defined called myUrl (which I use in InvokeHttp – Remote URL property)
(4) "InvokeHttp" : I use myUrl in "Remote Url" property. Have set "Send Message Body" as true.

My message body is constant and will not change.
But my question is, where/how do I include the message body. How can I include the message body in ExtractText (in point 3 above).

I know that in "GenerateFLowFile" we can include message body in property "Custom Text" and then link this to "InvokeHttp". But in my case I am using ExtractText to invoke "InvokeHttp"

Please please help!

One Answer

Use a ReplaceText processor to populate the POST body as the flowfile content prior to using InvokeHTTP. If the content is static, you can just replace all the existing content (.*) and replace it with the literal bytes you want to send.

Answered by Andy on January 1, 2022

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP