ServerpodClientShared constructor
ServerpodClientShared(
- String host,
- SerializationManager serializationManager, {
- dynamic securityContext,
- required AuthenticationKeyManager? authenticationKeyManager,
- bool logFailedCalls = true,
- required Duration? streamingConnectionTimeout,
- required Duration? connectionTimeout,
Creates a new ServerpodClient.
Implementation
ServerpodClientShared(
this.host,
this.serializationManager, {
dynamic securityContext,
required this.authenticationKeyManager,
this.logFailedCalls = true,
required Duration? streamingConnectionTimeout,
required Duration? connectionTimeout,
}) : connectionTimeout = connectionTimeout ?? const Duration(seconds: 20),
streamingConnectionTimeout =
streamingConnectionTimeout ?? const Duration(seconds: 5) {
assert(host.endsWith('/'),
'host must end with a slash, eg: https://example.com/');
assert(host.startsWith('http://') || host.startsWith('https://'),
'host must include protocol, eg: https://example.com/');
}