nodejs - how to get cookie in ws (einaros)

In socketio, I can easily get cookie with socket.handshake.headers.cookie. How could I do the same thing in ws?

You can try this one: ws.upgradeReq.headers.cookie.