- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
NIFI:Not able to POST using invokehttp, working perfect if used with generate file processor but does not works with gettwitter as a source (json)
- Labels:
-
Apache NiFi
Created on ‎04-01-2021 09:46 AM - edited ‎04-01-2021 09:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi ,
I have created 2 flows -
1] in this flow i have used GenerateFlowFile->UpdateAttribute->InvokeHttp
GenerateFlowFile config-
Dataformat = text
CustomText = Science is magic$$@@ i love Data ##
UpdateAttribute config -
mime.type = application/x-www-form-urlencoded
InvokeHttp config -
HTTP method = POST
and this works super fine .
But when i use this with gettwitter it fails as shown in below -
1] GetTwitter is working fine -
2] EvaluateJsonPath -
3] AttributeTOJson-
4] UpdateAttribute-
5] ReplaceText -
6] InvokeHTTP -
this is the error i am getting -
but if i set empty text at this from invokehttp processor -
then this error goes away but the api responds with missing api_key and text -
Somebody pls help, this is eating my head up . thanks in advance
Created ‎04-04-2021 04:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I got this resolved, the issue was with respect to the format of flowfile being forwarded to the invokehttp proessor. in order to send post body in form type it is necessary that you convert the format of the flowfile as just file, eg , if the flowfile is "package.json" we need to convert that into just "package". from above issue i kept everything same except i just added on attribute in updateattribute processor as shown in below pic -
Created ‎04-04-2021 04:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I got this resolved, the issue was with respect to the format of flowfile being forwarded to the invokehttp proessor. in order to send post body in form type it is necessary that you convert the format of the flowfile as just file, eg , if the flowfile is "package.json" we need to convert that into just "package". from above issue i kept everything same except i just added on attribute in updateattribute processor as shown in below pic -
