Send a handshake request to the server. Args: request: WebSocket handshake request event.
(self, request: Request)
| 283 | return subprotocol |
| 284 | |
| 285 | def send_request(self, request: Request) -> None: |
| 286 | """ |
| 287 | Send a handshake request to the server. |
| 288 | |
| 289 | Args: |
| 290 | request: WebSocket handshake request event. |
| 291 | |
| 292 | """ |
| 293 | if self.debug: |
| 294 | self.logger.debug("> GET %s HTTP/1.1", request.path) |
| 295 | for key, value in request.headers.raw_items(): |
| 296 | self.logger.debug("> %s: %s", key, value) |
| 297 | |
| 298 | self.writes.append(request.serialize()) |
| 299 | |
| 300 | def parse(self) -> Generator[None]: |
| 301 | if self.state is CONNECTING: |