- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
invoke http. i want to make form Authorisation before data send to api,i have been given a post http link (other than host url), content type and username and password , where and how to add them in nifi in invoke http
- Labels:
-
Apache NiFi
Created ‎04-28-2020 12:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i have got the below details other than normal host url,
POST /j_security_check
Content-type: application/x-www-form-urlencoded
j_username=<userid>&j_password=<password>
Created on ‎04-28-2020 05:09 AM - edited ‎04-28-2020 05:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@san_re The configuration of Remote Url in InvokeHTTP should be as follows:
/j_security_check?j_username=${j_username}&j_password=${j_password}
Notice the credential values are passed to the url with the ?. This is the only change in the processor config.
Here is a demo flow:
GenerateFlowFile - starts flow for testing
UpdateAttribute - sets user, pass,and mime type attributes needed in InvokeHttp
InvokeHttp - sends POST
You can find this template on my GitHub to inspect the entire flow:
https://github.com/steven-dfheinz/NiFi-Templates/blob/master/InvokeHttp_Demo.xml
Created on ‎04-28-2020 05:09 AM - edited ‎04-28-2020 05:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@san_re The configuration of Remote Url in InvokeHTTP should be as follows:
/j_security_check?j_username=${j_username}&j_password=${j_password}
Notice the credential values are passed to the url with the ?. This is the only change in the processor config.
Here is a demo flow:
GenerateFlowFile - starts flow for testing
UpdateAttribute - sets user, pass,and mime type attributes needed in InvokeHttp
InvokeHttp - sends POST
You can find this template on my GitHub to inspect the entire flow:
https://github.com/steven-dfheinz/NiFi-Templates/blob/master/InvokeHttp_Demo.xml
