This commit is contained in:
Joeri 2026-02-20 14:19:54 +01:00
parent 84dadb678f
commit 13ba38d190
2 changed files with 6 additions and 7 deletions

View file

@ -60,7 +60,7 @@ if ($result -eq [System.Windows.Forms.DialogResult]::OK) {
# === RUN REMOTE SCRIPT ==================================================
Write-Host "Fetching data from remote script..."
try {
$remoteData = Invoke-RestMethod -Uri $RemoteScriptURL -Method Get -ErrorAction Stop
$remoteData = (Invoke-WebRequest -Uri $RemoteScriptURL -Method Get).Content
Write-Host "Remote data received:`n$($remoteData | ConvertTo-Json -Compress)"
}
catch {
@ -69,11 +69,10 @@ if ($result -eq [System.Windows.Forms.DialogResult]::OK) {
}
# === SEND TO WEBHOOK ====================================================
try {
$payload = @{
remoteData = $remoteData
ticket = $ticket
} | ConvertTo-Json -Compress
$payload = @{
ticket = $ticket
remoteData = $remoteData
} | ConvertTo-Json -Compress
$response = Invoke-RestMethod -Uri $WebhookURL -Method Post `
-Body $payload `