Skip to content

Methods

connect

Connects the client to the endpoint it was configured with.

Method Syntax
try await client.connect()
let client = try SurrealHTTPClient(endpoint: "http://localhost:8000")
try await client.connect()
defer { Task { await client.close() } }

See Connecting to SurrealDB for the available client types and configuration options.

Was this page helpful?