Performance optimization

Updated Invoke-Webrequest to use the method 'head' to save time.
This commit is contained in:
David das Neves 2020-06-16 17:31:34 +02:00 committed by GitHub
parent 0041efd957
commit 8eb406734d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,7 +14,7 @@
Write-Host "Requesting url $url"
try {
$request = Invoke-WebRequest -Uri $url
$request = Invoke-WebRequest -Uri $url -DisableKeepAlive -UseBasicParsing -Method head
} catch {
Write-Warning -Message "Found dead url $url in $fileName"
$unreachable += $url