Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 06-01-2018 04:39 PM
I have curl command as below.
curl -s -XPOST -H "Accept: application/json" -H "Content-Type: application/x-www-form-urlencoded" -d 'username=usco&password=asdl2342&client_id=dwer234324-2sd2-32dwq&scope=read' 'https://rest.abc.com/security'
I am trying to replicate this in Nifi. I am trying to figure out how and where the above options to be provided in InvokeHTTP processor. I have gone through the articles and some mentioned I have to define it in body of flow file. But I couldn't understand what exactly goes into body and what goes into extra attributes (if I need to add) in InvokeHTTP processsor.
Created 06-01-2018 05:06 PM
Here is what I think you should use to make this work:
| -X POST | use processor HTTP method attribute and set to POST |
| -x http://proxyhost:port | I think you should consider adding this configuration or add properties Proxy host=proxyhost, Proxy port=port and Proxy protocol=https |
| -H "Accept: application/json" | Use the Attributes to send referencing a new attribute with the value (add 1 extra attributes with corresponding value) |
| -H "Content-Type: application/x-www-form-urlencoded" | Use Content type attribute |
| -d 'data sent' | Send Message Body = true. And the content should come as inbound flowfile to the processor. To test try adding a GenerateFlowFile processor with the content without single quotes |
| https://hostname/security/v1/oauth/token | Set in Remote url |
Finally since endpoint is ssl enabled you need to set SSL Context Service.
HTH
*** If you found this answer addressed your question, please take a moment to login and click the "accept" link on the answer.
Created 12-15-2022 01:37 AM
Hi can you please help with this query, I am facing the same issue how did you resolve it.
Created 12-15-2022 05:16 AM
@Bello as this is an older post, you would have a better chance of receiving a resolution by starting a new thread. This will also be an opportunity to provide details specific to your environment that could aid others in assisting you with a more accurate answer to your question. You can link this thread as a reference in your new post.
Regards,
Vidya Sargur,