From 01f1d0d06c08cdb275d7c42382d4d7631c6616a8 Mon Sep 17 00:00:00 2001 From: Roy Hyunjin Han Date: Fri, 26 Apr 2013 10:27:51 -0700 Subject: [PATCH] Updated README --- README.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.rst b/README.rst index 3c348b8..8093fcc 100644 --- a/README.rst +++ b/README.rst @@ -109,10 +109,20 @@ Define different namespaces on a single socket. :: Open secure websockets (HTTPS / WSS) behind a proxy. :: + from socketIO_client import SocketIO + SocketIO('localhost', 8000, secure=True, proxies={'https': 'https://proxy.example.com:8080'}) +Specify custom headers thanks to the `requests`_ library. :: + + from socketIO_client import SocketIO + from base64 import b64encode + + SocketIO('localhost', 8000, + headers={'Authorization': 'Basic ' + b64encode('username:password')}) + License ------- @@ -129,6 +139,7 @@ Credits .. _socket.io: http://socket.io +.. _requests: http://python-requests.org .. _Guillermo Rauch: https://github.com/guille .. _socket.io specification: https://github.com/LearnBoost/socket.io-spec