The "corrupt file" is actually an "object moved" link. Add the -L switch.
-L, --location Follow redirects
curl.exe -L -o selenium-webdriver.nupkg https://www.nuget.org/api/v2/package/Selenium.WebDriver
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
I am trying to use
curl.exe -o selenium-webdriver.nupkg https://www.nuget.org/api/v2/package/Selenium.WebDriver
In order to download the file selenium.webdriver.4.3.0.nupkg to my pc, and this will be used in automation. However downloading it with just /Selenium.WebDriver
rather than /selenium.webdriver.4.3.0.nupkg
causes a corrupted file, presumably because it is not specified exactly.
When entering https://www.nuget.org/api/v2/package/Selenium.WebDriver
into my search bar it downloads the nupkg file without issue.
I have to use curl.exe as my companies proxy blocks wget and Invoke-Webrequest.
Am I doing something wrong?
Thanks
The "corrupt file" is actually an "object moved" link. Add the -L switch.
-L, --location Follow redirects
curl.exe -L -o selenium-webdriver.nupkg https://www.nuget.org/api/v2/package/Selenium.WebDriver
Hello LukeP
This may seem a Curl issue, since the http request is successful (no file corruption). I would suggest to open a Curl ticket through the "Report a bug" in their website.
On the other hand, I would help if you could manage to get an exception on your company to use Invoke-Webrequest in case the usage is required.
---------------------------------------------------------------------------------------------------------------------------------------------------
--If the reply is helpful, please Upvote and Accept as answer--