I want to download a (100MB debian) file from a network location. I don't want to interact with the file; I just want it saved on my system. As input, I have the url and api key (passed as header). The following curl command works in my terminal:
curl --insecure -H key:value --output C:\Users\username\filename.deb https://path/filename.deb
So I tried curl like this:
Scenario: Download file
* karate.exec('curl --insecure -H key:value --output C:\Users\username\filename.deb https://path/filename.deb')
But nothing happens. Then I tried writing the response, left out the output field, but the result is 190MB instead of 100MB:
Scenario: Download file
* def result = karate.exec('curl --insecure -H key:value https://path/filename.deb')
* karate.write(result, 'fw.deb')
Is there a way to just execute a command (I tried karate.fork
and it didn't do anything either) and not need to catch the result and write it to a file?