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.
- See: HTTP API Reference
- See: SQL Reference
The SDK passes params as JSON (for $1, $2, … placeholders).
Related auth endpoints used by the SDK:
login(...)→POST /v1/api/auth/loginrefreshToken(...)→POST /v1/api/auth/refresh
Live subscriptions (WebSocket)
subscribe(...) uses the WebSocket realtime endpoint.
- See: WebSocket Protocol
- See: Architecture: Live Query
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
timeoutcontrols HTTP request timeout for queries.maxRetriescontrols retry count for idempotent queries (typicallySELECT).
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