From a5436bba1fe5a144c1f988460cb007f822425bad Mon Sep 17 00:00:00 2001 From: devendram Date: Wed, 29 Apr 2015 00:10:09 +0530 Subject: Update README.md --- python/README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'python') diff --git a/python/README.md b/python/README.md index 33e6235..a48fb17 100644 --- a/python/README.md +++ b/python/README.md @@ -28,6 +28,25 @@ pubnub.publish(channel, message, callback=callback, error=callback) ``` +publish supports POST method also. To use POST, pass post=True as parameter to publish method call. +Default method is GET + +``` +channel = 'hello_world' +message = 'Hello World !!!' + +# Synchronous usage +print pubnub.publish(channel='hello_world', message='Hello World !!!', post=True) + +# Asynchronous usage + +def callback(message): + print(message) + +pubnub.publish(channel, message, callback=callback, error=callback, post=True) + +``` + #### SUBSCRIBE -- cgit v1.2.3