MCPcopy Index your code
hub / github.com/python-websockets/websockets / send_request

Method send_request

src/websockets/client.py:285–298  ·  view source on GitHub ↗

Send a handshake request to the server. Args: request: WebSocket handshake request event.

(self, request: Request)

Source from the content-addressed store, hash-verified

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:

Callers 3

test_send_requestMethod · 0.95
handshakeMethod · 0.80
handshakeMethod · 0.80

Calls 3

raw_itemsMethod · 0.80
appendMethod · 0.80
serializeMethod · 0.45

Tested by 1

test_send_requestMethod · 0.76