diff options
| author | devendram | 2015-04-29 00:10:09 +0530 | 
|---|---|---|
| committer | devendram | 2015-04-29 00:10:09 +0530 | 
| commit | a5436bba1fe5a144c1f988460cb007f822425bad (patch) | |
| tree | 1c6722bed138e44c4e1306714567695f9902e016 /python/README.md | |
| parent | 58511aeb2796142cabf0c2f4740db03daf9c0fa3 (diff) | |
| download | pubnub-python-a5436bba1fe5a144c1f988460cb007f822425bad.tar.bz2 | |
Update README.md
Diffstat (limited to 'python/README.md')
| -rw-r--r-- | python/README.md | 19 | 
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 | 
