Issue when passing URL as parameter
-
I have the very simple trigger that runs
curl [params]So I can make GET requests to a local address remotely via the triggerCMD API. (If you think this is a work around using localtunnel or ngrok, it is exactly that)
My triggerCMD API request looks like this
https://www.triggercmd.com/api/run/triggerSave?computer=<MY_COMPUTER>&trigger=curl&token=<MY-TOKEN>¶ms="http://localhost:4040/webhook/id?par1=1&par2=b&par3=temp"
The request only passes the first argument (par1 = 1), making me think the "&" character is improperly interpreted, despite being between quotes.
The curl command runs correctly through the terminal
curl "http://localhost:4040/webhook/id?par1=1&par2=b&par3=temp"passing all three arguments, again adding weight to the possibility that the API call is doing something to URL when passed as parameter.
Any insight on how I could get this to work would be greatly appreciated!
-
@caio-kenup, I'll mention this setting in your profile, but you may have already found it:

I blocked those characters by default because they could be used to run arbitrary commands if parameters are enabled.
A safer way to do what you're trying to do would be to use a script that takes a series of parameters like this:
Linux/Mac bash script:
set -x curl "http://localhost:4040/webhook/id?par1=$1&par2=$2&par3=$3"Make it executable with chmod +x ./script.sh
Test it with: ./script.bat a b cWindows script:
curl "http://localhost:4040/webhook/id?par1=$1&par2=$2&par3=$3"Test it with: script.bat a b c
-
@Caio-Kenup I solved this problem including ^ just before &. So, as an example, I changed
start www.youtube.com/watch?v=dQw4w9WgXcQ&autoplay=1to
start www.youtube.com/watch?v=dQw4w9WgXcQ^&autoplay=1I believe that it will works to everybody that has a URL with character "&"
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login