[rabbitmq-discuss] Posting a json body as payload using the http api

Emile Joubert emile at rabbitmq.com
Wed Jul 25 10:11:06 BST 2012


Hi,

On 24/07/12 23:59, dilipl wrote:
> [...] Now this worked fine, when my
> payload was a simple String. It *does not work*, when I use json as the
> body. I am thinking the json needs to be escaped somehow?

You may have answered your own question. The payload can be a string or
base64 encoded and the payload_encoding key must be set accordingly.
Either encode the body as base64 or escape the contents and supply it as
a string. Any good JSON reference should provide string escape rules.

-Emile



More information about the rabbitmq-discuss mailing list