Skip to content

Commit

Permalink
pr-fix: add body to put request
Browse files Browse the repository at this point in the history
  • Loading branch information
stijnmoreels committed Nov 15, 2024
1 parent b181449 commit 9d8bca9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ function global:Remove-AzDevOpsGroupVariable {
$upsertVariableGroupUrl = $projectUri + $project + "/_apis/distributedtask/variablegroups/$($json.id)?api-version=7.1"
$headers = @{ Authorization = "Bearer $env:SYSTEM_ACCESSTOKEN" }

Write-Host "PUT -> $upsertVariableGroupUrl"
$json = $json | ConvertTo-Json -Depth 10 -Compress
Write-Host "PUT $json -> $upsertVariableGroupUrl"
$putResponse = Invoke-WebRequest -Uri $upsertVariableGroupUrl -Method Put -Headers $headers -Body $json -ContentType 'application/json; charset=utf-8'
Write-Host "$($putResponse.StatusCode) <- $upsertVariableGroupUrl"
}
Expand Down

0 comments on commit 9d8bca9

Please sign in to comment.