[rabbitmq-discuss] RabbitMQ JSON-RPC via GET rather than POST
Donovan
donovanhide at gmail.com
Wed Jun 2 16:04:33 BST 2010
Hi,
This:
curl "http://dev.rabbitmq.com/rpc/rabbitmq" -d '{"version":"1.1","id":
2,"method":"open","params":["guest","guest",5,null]}'
return this:
{"version":"1.1","id":2,"result":
{"service":"6EEAADDC83484475E58A4AC1C5AB3D9D"}}
Quoting from here:
http://hg.opensource.lshift.net/erlang-rfc4627/raw-file/a800c54e7ff3/doc/index.html
<Quote>
Similarly, any idempotent methods provided by a service may be
accessed via POST to the base URL for the service, or via GET to a URL
of the form
http://localhost:5671/rpc/ServiceName/MethodName?arg=value&..
</Quote>
I'm trying to create the equivalent GET version of the POST curl
above, so that I can do JSON-RPC across domains. POST is not permitted
by browsers when using jQuery, annoyingly!!!
I tried:
curl "http://dev.rabbitmq.com/rpc/rabbitmq/open?
username=guest&password=guest&sessionTimeout=5"
and got:
{"version":"1.1","id":null,"error":{"name":"JSONRPCError","code":
403,"message":"Non-idempotent method","error":"open"}}
Any help much appreciated!!
Cheers,
Donovan.
More information about the rabbitmq-discuss
mailing list