Open mooock opened 5 years ago
Found the issue in
$url = Join-Parts $BaseUri "/api/queues/$([System.Web.HttpUtility]::UrlEncode($VirtualHost))/$([uri]::EscapeDataString("$Name"))/get"
instead of using the .Net class [System.Web.HttpUtility]::UrlEncode use [uri]::EscapeDataString for translating it a space to %20 and not +
when using something like this
$Queue = 'Subscription for 2fc8e48a-0a10-40dd-aeb9-a2f552136243e5#8' Get-RabbitMQMessage -VirtualHost $VirtualHost -Name $Queue -Count 1 -Credential $RMQCRED -BaseUri $RMQURI -Encoding auto -View Default
i receive this Invoke-RestMethod : {"error":"not_found","reason":"NOT_FOUND - no queue 'Subscription+for+2fc8e48a-0a10-40dd-aeb9-a2f552136243e5#8' in vhost 'RMQ_TEST'"} At line:131 char:13
it looks like the + sign is translated