diff --git a/Syndication/AzureStack.MarketplaceSyndication.psm1 b/Syndication/AzureStack.MarketplaceSyndication.psm1 index 863e248e..8b64adf0 100644 --- a/Syndication/AzureStack.MarketplaceSyndication.psm1 +++ b/Syndication/AzureStack.MarketplaceSyndication.psm1 @@ -1123,7 +1123,10 @@ function InvokeWebRequest { while (-not $completed) { try { - [void]($response = Invoke-WebRequest -Method $Method -Uri $Uri -ContentType "application/json" -Headers $Headers -Body $content -ErrorAction Stop) + if ($content -ne $null) { + $content = [System.Text.Encoding]::UTF8.GetBytes($content) + } + [void]($response = Invoke-WebRequest -Method $Method -Uri $Uri -ContentType "application/json; charset=utf-8" -Headers $Headers -Body $content -ErrorAction Stop) $retryCount = 0 Ensure-SuccessStatusCode -StatusCode $response.StatusCode $completed = $true