title: Open WebSocket connection with authentication cookie
body: <p>I have the same issue as <a href="https://stackoverflow.com/questions/22692763/websockets-and-cookies-in-android">Websockets and cookies in Android</a>, and I have been trying to solve it as the first comment suggested,</p>
  
  <blockquote>
    <p>WebSocketClient( URI serverUri , Draft protocolDraft , Map httpHeaders , int connectTimeout)</p>
  </blockquote>
  
  <p>using <a href="https://github.com/TooTallNate/Java-WebSocket" rel="nofollow noreferrer">Java-WebSocket</a>, as well as looking at many other APIs such as Jetty and <a href="https://github.com/koush/AndroidAsync" rel="nofollow noreferrer">AndroidAsync</a>. But despite this I am unable to open up a websocket connection. </p>
  
  <p>I have an <a href="http://developer.android.com/reference/org/apache/http/cookie/package-summary.html" rel="nofollow noreferrer">Apache http cookie</a>, and need this to authenticate myself to the server with a WebSocket. What is the correct way of translating a cookie into a httpHeader, or is there any neat way to simply add the entire cookie in the authentication when connection to a websocket? Maybe I am just missing the obvious..</p>
  
  <p>Apologies for possible misuses of terms, but I hope you get the general idea.</p>
  
  <p>Any help would be much appreciated, thank you!</p>