The community forums are in BETA and closed to the public.

does the message on GET Request (publish) have a special format?

in order to publish a message using the PubNub JSON/JSONP REST API with HTTP GET, the following format is demanded: http://pubsub.pubnub.com /publish /pub-key /sub-key /signature /channel /callback /message So, my question is, does the message field require a specific format. I'm working with an Arduino Yun and i'm using HttpClient library.

Hey Nejma,

The publish message should be JSON formatted then URI encoded. Here is an example string: http://pubsub.pubnub.com/publish/demo/demo/0/hello_world/0/%22Hello%20World%22

BTW, I have worked with the Arduino Yun in the past and have a short sketch implementing the HttpClient. It only has subscribe, but it supports JSON parsing! Should be a big help for you:

https://github.com/pubnub/pubnub-iot-house/blob/master/yun/sketch_oct18a/sketch_oct18a.ino


Comments to this discussion are now closed!