This curl command works as desired:
curl -H "X-Api-Key:j65k423lj4k2l3fds" `
-X PUT `
-d "alerts_enabled=true" `
https://some/working/file.xml
How can I recreate this natively in PS with Invoke-WebRequest
? I've tried
Invoke-WebRequest -Headers @{"X-Api-Key" = "j65k423lj4k2l3fds"} `
-Method PUT `
-Body "alerts_enabled=true" `
-Uri https://some/working/file.xml
I've also tried making objects for all the params (e.g. $headers = @{"X-Api-Key" = "Key:j65k423lj4k2l3fds"}
and passing -Headers $headers
).
Thanks