serverpod_client
4.1.2, released 7 days ago by serverpod.dev
Base classes for communicating with a Serverpod backend via HTTP and WebSocket
What it does
Provides client-side abstractions for sending requests, receiving responses, and handling WebSocket streams to a Serverpod server. It includes serialization helpers and connection management.
AI-written summary of version 4.1.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to integrate a Flutter app with a Serverpod backend
- You want type-safe request/response handling without custom code generation
- You prefer a lightweight client over full-featured HTTP libraries
Skip it when
- You need advanced HTTP features like interceptors, caching, or multipart uploads
- You prefer a declarative networking approach with code generation
Strengths
- Lightweight and tightly coupled to Serverpod API
- Supports both HTTP and WebSocket communication
- No build_runner or codegen required
Weaknesses
- Limited to Serverpod servers only
- No built-in support for advanced HTTP features
- No declarative API
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 7
Add dependency to pubspec and import; no build_runner needed
import 'package:serverpod_client/serverpod_client.dart';
final client = ServerpodClient('http://localhost:8080');
await client.call('myEndpoint', {'param': 'value'});Alternatives
Packages that do the same job and could replace serverpod_client.
- sse
Bidirectional Server Sent Events client and server for Dart.
80Compare - graphql_server2
Base package for executing GraphQL queries, mutations, and subscriptions against a schema.
76Compare - belatuk_http_server
Utility classes that simplify building Dart server‑side HTTP services with HttpServer.
73Compare - modbus_client
Base Modbus client package for sending requests via Serial and TCP/IP.
56Compare
Works with
Packages commonly used together with serverpod_client: ones it builds on, ones built on it, and its own family.
- webserverpod_client depends on itLightweight bindings for browser APIs via JS interop
- web_socket_channelserverpod_client depends on itCross‑platform WebSocket channel wrapper for Dart
- web_socketserverpod_client depends on itAn easy-to-use library for communicating with WebSockets that has multiple implementations.
- serverpodSame familyServerpod is the ultimate app-stack for agentic coding. It is a complete, open-source solution for your app, backend, website, and database, all using Flutter and Dart.
- serverpod_cliSame familyCommand line tools for Serverpod.
- serverpod_auth_serverSame familyAuthentication server module for Serverpod backend applications.
- serverpod_cloud_storage_s3Same familyServerpod integration for S3 cloud storage
- serverpod_auth_email_flutterSame familyFlutter package for email sign‑in with Serverpod authentication.