[rabbitmq-discuss] Http API: new user
SAG - Jonathan Andrés
jandres at omie.es
Mon Aug 26 12:10:20 BST 2013
Yes, the message "Error: bad_request, Reason: not_json" is the response of the server. This message:
=ERROR REPORT==== 26-Aug-2013::08:44:04 ===
webmachine error: path="/api/users/newUser"
"Bad Request"
Is in the logs of RabbitMQ.
I'm using CURL/7.31.0 on windows (windows 7 or windows server 2008, the same results).
This others calls works well:
curl -i -u guest:guest http://localhost:15672/api/vhosts
curl -i -v -u guest:guest -H "content-type:application/json" http://localhost:15672/api/users
But I have the same problem with this:
curl -i -u guest:guest -H "content-type:application/json" -XPUT -d'{"type":"direct","auto_delete":false,"durable":true,"arguments":[]}' http://localhost:15672/api/exchanges/%2f/my-new-exchange
The Rabbit admin works well too.
Thank you!
-----Mensaje original-----
De: Matthias Radestock [mailto:matthias at rabbitmq.com]
Enviado el: lunes, 26 de agosto de 2013 10:59
Para: SAG - Jonathan Andrés
CC: Discussions about RabbitMQ
Asunto: Re: [rabbitmq-discuss] Http API: new user
On 26/08/13 07:48, SAG - Jonathan Andrés wrote:
> I think I have the last versions of rabbit and Erlang:
>
> =INFO REPORT==== 26-Aug-2013::08:42:28 ===
> Starting RabbitMQ 3.1.5 on Erlang R16B01
>
> If I try with:
>
> curl -i -v -u guest:guest -H "content-type:application/json" -XPUT -d'{"password":"secret","tags":"administrator"}' http://localhost:15672/api/users/newUser
>
> I get this in the logs:
>
> =ERROR REPORT==== 26-Aug-2013::08:44:04 ===
> webmachine error: path="/api/users/newUser"
> "Bad Request"
>
> And it's the same that works for you. I don't understand what is happening.
I thought you said it complained with "Error: bad_request, Reason:
not_json"?
What version of curl are you running? And on what O/S?
Do other calls to the management API work? Does the management UI work?
Does rabbitmqadmin work?
Regards,
Matthias.
More information about the rabbitmq-discuss
mailing list