How to execute curl command using snaps


Is there any Snaps available to execute the ‘cURL’ commands in Snaplogic? if Yes, Can you please let us know the process.

Thanks in Advance.

Have you taken a look at the Rest Snap Pack?

I am also facing the same issue . Is there any way out to call the curl command from the REST snaps ? I checked the documentation but could not find anything regarding that .

If you want to execute CURL command, you can use Script snap. You have choice to choose between JavaScript/Python/Ruby. Using Python, you can invoke CURL command via SubProcess module.

Can you provide an example of the type of curl command(s) you wish to run?

This type of sample curl comand : "curl -v http://localhost:8093/query/service
-d ‘statement=SELECT text FROM tweets WHERE rating = $1 AND when > $2&args=[ 9.5, “1-1-2014”]’ "

First of all, I hope your service http://localhost:8093/query/service is located within the plex/node where you are executing the pipeline. If not, then its an incorrect use-case. If yes, then there are two ways to do it.

(a) Use REST POST snap. The entire body can be given in Entity property.
(b) Use Script snap with python/javascript and invoke the post call using the respective library.

But, first option is the best and the easiest.

I have used Rest post snap and it is working for me