PS C:\> $postParams = @{eventId='235'}
PS C:\> curl -Method DELETE -Uri http://localhost:8080/eventlist/api/v1/events -Body $postParams
curl : Error deleting event
At line:1 char:1
+ curl -Method DELETE -Uri http://localhost:8080/eventlist/api/v1/events -Body $po ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], Web
eption
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
However, if I am trying to delete like
curl -Method DELETE -Uri http://localhost:8080/eventlist/api/v1/events?eventId=235
it works
Why is not working in the first way using $postParams
?