aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordevendram2015-04-29 00:10:09 +0530
committerdevendram2015-04-29 00:10:09 +0530
commita5436bba1fe5a144c1f988460cb007f822425bad (patch)
tree1c6722bed138e44c4e1306714567695f9902e016
parent58511aeb2796142cabf0c2f4740db03daf9c0fa3 (diff)
downloadpubnub-python-a5436bba1fe5a144c1f988460cb007f822425bad.tar.bz2
Update README.md
-rw-r--r--python/README.md19
1 files changed, 19 insertions, 0 deletions
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