I am using the Rabbit MQ HTTP API to purge all messages from a single queue. I have the queue name and I want to purge all these messages. I want to use the HTTP API from my powershell script. This is what I execute from my powershell script:-
Invoke-WebRequest http://server_name:55672/api/queues/%2f/queue_name/Contents -Credential $cred -Method DELETE
But I am getting the below error. Can someone guide me on this?
Invoke-WebRequest : Not Found
The requested document was not found on this server. mochiweb+webmachine web server
- CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
- FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand