Execute Command - curl
Posted: Mon Aug 15, 2022 11:28 pm
Please forgive me - I have a complete lack of knowledge. Working on a Mac and using Terminal.
My job starts off with a url address. The url is always a pdf. When saved manually from a browser, the pdf extension is not appended. An example:
http://MISapp/MI/viewreport.ashx?path=D ... &jobid=114
If I append ".pdf" when saved from Safari, I have a PDF.
Knowing this I plug this command into Terminal:
curl -O 'http://MISapp/MI/viewreport.ashx?path=D ... id=114.pdf'
And I end up with a PDF in my user folder.
Now, to set up Execute Command in Switch. I have tried everything. For "Command or Path", my best guess is:
curl
OR
/usr/bin/curl
For the arguments, I have no clue. From what I see, I don't need to pass on an input file, because the command does not require one. So what does that mean for "%1"? Does it need to be blank?
With the command run as is from Terminal, the output PDF file is in my user folder. If possible I need Switch to pick this up so it continues on in the flow. I guess this happens in the "%2" argument?
I have tried everything and no luck. What I want is the url to be variable, depending on the job. I will pick up the Job Number and Job ID as private data keys and include those in the url part of the argument. But I simply cannot get a result even without variables. When I put a fixed address in the arguments, I get nothing. But it does work from Terminal.
Any help understanding is appreciated. Thank you.
My job starts off with a url address. The url is always a pdf. When saved manually from a browser, the pdf extension is not appended. An example:
http://MISapp/MI/viewreport.ashx?path=D ... &jobid=114
If I append ".pdf" when saved from Safari, I have a PDF.
Knowing this I plug this command into Terminal:
curl -O 'http://MISapp/MI/viewreport.ashx?path=D ... id=114.pdf'
And I end up with a PDF in my user folder.
Now, to set up Execute Command in Switch. I have tried everything. For "Command or Path", my best guess is:
curl
OR
/usr/bin/curl
For the arguments, I have no clue. From what I see, I don't need to pass on an input file, because the command does not require one. So what does that mean for "%1"? Does it need to be blank?
With the command run as is from Terminal, the output PDF file is in my user folder. If possible I need Switch to pick this up so it continues on in the flow. I guess this happens in the "%2" argument?
I have tried everything and no luck. What I want is the url to be variable, depending on the job. I will pick up the Job Number and Job ID as private data keys and include those in the url part of the argument. But I simply cannot get a result even without variables. When I put a fixed address in the arguments, I get nothing. But it does work from Terminal.
Any help understanding is appreciated. Thank you.