diff --git a/WASP/Private/Invoke-Webhook.ps1 b/WASP/Private/Invoke-Webhook.ps1 index 28261ab..a3d8f37 100644 --- a/WASP/Private/Invoke-Webhook.ps1 +++ b/WASP/Private/Invoke-Webhook.ps1 @@ -90,10 +90,11 @@ function Invoke-Webhook { $updatedJsonContent = $updatedJsonContent -replace $systemRegEx, $system -replace $styleRegEx, $style $parameters = @{ - "URI" = $WebhookURL - "Method" = 'POST' - "Body" = $updatedJsonContent - "ContentType" = 'application/json' + "URI" = $WebhookURL + "Method" = 'POST' + "Body" = $updatedJsonContent + "ContentType" = 'application/json' + "UseBasicParsing" = $true } try { diff --git a/WASP/Private/Test-ExistsOnRepo.ps1 b/WASP/Private/Test-ExistsOnRepo.ps1 index 5468120..34760ad 100644 --- a/WASP/Private/Test-ExistsOnRepo.ps1 +++ b/WASP/Private/Test-ExistsOnRepo.ps1 @@ -55,7 +55,7 @@ function Test-ExistsOnRepo { $Base64Auth = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $Config.Application.RepositoryManagerAPIUser, $Config.Application.RepositoryManagerAPIPassword))) $Uri = $RepositoryUrl + "Packages(Id='$PackageName',Version='$PackageVersion')" try { - $Response = Invoke-WebRequest -Uri $Uri -Headers @{Authorization = "Basic $Base64Auth" } + $Response = Invoke-WebRequest -Uri $Uri -Headers @{Authorization = "Basic $Base64Auth" } -UseBasicParsing [xml]$XMLContent = $Response | Select-Object -ExpandProperty Content [datetime]$PublishDate = $XMLContent.entry.properties.Published.'#text' Write-Log "Package $PackageName with version $PackageVersion on repo server ($Repository) is current: $($PublishDate -ge $FileCreationDate)" @@ -66,4 +66,4 @@ function Test-ExistsOnRepo { } return $false } -} \ No newline at end of file +}