title: How to connect to webSocket using Starscream?
body: <p>I want to establish a socket connection. i am using below code </p>
  
  <pre><code>    var request = URLRequest(url: URL(string: "url")!)
      request.timeoutInterval = 2.0
      request.httpMethod = "POST"
      request.setValue("header", forHTTPHeaderField: "Authorization")
      socket = WebSocket(request: request)
      socket.delegate = self
      socket.connect()
  </code></pre>
  
  <p>And delegates are</p>
  
  <pre><code>func websocketDidConnect(socket: WebSocketClient) {
  
      print("websocket is connected")
  }
  
  func websocketDidDisconnect(socket: WebSocketClient, error: Error?) {
  
      if let e = error as? WSError {
  
          print("websocket is disconnected: \(e.message)")
  
      } else if let e = error {
  
          print("websocket is disconnected: \(e.localizedDescription)")
  
      } else {
  
          print("websocket disconnected")
      }
  }
  
  func websocketDidReceiveMessage(socket: WebSocketClient, text: String) {
  
      print("Received text: \(text)")
  }
  
  func websocketDidReceiveData(socket: WebSocketClient, data: Data) {
  
      print("Received data: \(data.count)")
  }
  </code></pre>
  
  <p>i am getting this error </p>
  
  <p>websocket is disconnected: Invalid HTTP upgrade</p>