baml.ws.connect

Open a WebSocket connection with additional request headers.

Reference version

Signature

function baml.ws.connect(
url: string,
headers: map<string, string>,
timeout: baml.time.Duration = …

Open a WebSocket connection with additional request headers.

Throws

  • baml.errors.Io if the connection or the opening handshake fails.
  • baml.errors.Timeout if neither completes within timeout.

Source:<builtin>/baml/ns_ws/ws.bamlbytes 25372792