title: Passing cookie through python websocket client
body: <p>I am using the <a href="https://github.com/liris/websocket-client" rel="noreferrer">websocket-client</a> to connect to a node.js server (which is my websocket server), and I have been able to send messages through websockets from python to node.js successfully.</p>
  
  <p>My python client uses the <a href="http://docs.python-requests.org/en/latest/" rel="noreferrer">requests</a> module to login to a website and collect the cookies (that are passed from the server as a result of successful login). I would like these cookies to be passed as a part of websocket-client as shown in the code <a href="https://github.com/liris/websocket-client/blob/1b37c10c1c1c655bced557fb3b762f3ace8f3e1a/websocket/_core.py#L248" rel="noreferrer">here</a>. </p>
  
  <p>I get the following cookies from login:</p>
  
  <pre><code>(Pdb) requests.utils.dict_from_cookiejar(client.cookies)
  {'csrftoken': 'DhSf0z9Ouu5f1SbfGWBg5BuBe1UuJMLr', 'sessionid': 'pu6ig4z4mtq5k8rvm6kuv8g3fdegs47d'}
  </code></pre>
  
  <p>How do I send that cookie when I create the websocket?</p>
  
  <pre><code>ws = websocket.WebSocketApp("ws://localhost:8080/",
                            on_message = on_message,
                            on_error = on_error,
                            on_close = on_close,
                            # cookie = ? what goes here ?
      )
  </code></pre>