replace web request to rest method

This commit is contained in:
Dmitry Shibanov
2020-02-11 13:02:27 +03:00
parent 03d0e3d1c6
commit d72263d6c1

View File

@@ -9,7 +9,7 @@ Import-Module -Name PathHelpers -Force
$temp_install_dir = 'C:\Windows\Installer'
New-Item -Path $temp_install_dir -ItemType Directory -Force
$versionsJson = Invoke-WebRequest "https://product-details.mozilla.org/1.0/firefox_versions.json" | ConvertFrom-Json
$versionsJson = Invoke-RestMethod "https://product-details.mozilla.org/1.0/firefox_versions.json"
$latestVersion = $versionsJson.LATEST_FIREFOX_VERSION
Write-Host "Firefox latest version: $latestVersion"