Skip to Content
SDK & ClientDart / Flutter SDKTransport & Endpoints

Transport & Endpoints

The Dart SDK is a high-level wrapper over the same public endpoints described in the API reference.

SQL execution (HTTP)

query(...) executes SQL over the HTTP SQL endpoint.

The SDK passes params as JSON (for $1, $2, … placeholders).

Related auth endpoints used by the SDK:

  • login(...)POST /v1/api/auth/login
  • refreshToken(...)POST /v1/api/auth/refresh

Live subscriptions (WebSocket)

subscribe(...) uses the WebSocket realtime endpoint.

Debugging compression

By default, the server may send gzip-compressed frames. For local debugging, disable compression:

final client = await KalamClient.connect( url: 'http://localhost:8080', authProvider: () async => Auth.jwt(await getJwt()), disableCompression: true, );

This appends ?compress=false to the WS URL so you can more easily inspect frames.

Do not enable in production. Compression reduces bandwidth and improves performance.

Timeouts and retries

  • timeout controls HTTP request timeout for queries.
  • maxRetries controls retry count for idempotent queries (typically SELECT).
final client = await KalamClient.connect( url: 'http://localhost:8080', authProvider: () async => Auth.jwt(await getJwt()), timeout: const Duration(seconds: 10), maxRetries: 2, );

Next

Last updated on