RpcClient constructor
RpcClient({
- required Uri baseUri,
- required RpcTransport transport,
- Serializer? serializer,
- RpcHeadersProvider? headersProvider,
- String functionPath = '/__odroe/functions',
- int maxResponseFrameBytes = defaultMaxResponseFrameBytes,
Creates a client for one Odroe server origin.
Implementation
RpcClient({
required this.baseUri,
required this.transport,
Serializer? serializer,
this.headersProvider,
String functionPath = '/__odroe/functions',
this.maxResponseFrameBytes = defaultMaxResponseFrameBytes,
}) : serializer = serializer ?? Serializer(),
functionPath = normalizeFunctionPath(functionPath, allowRelative: true) {
if (maxResponseFrameBytes <= 0) {
throw ArgumentError.value(
maxResponseFrameBytes,
'maxResponseFrameBytes',
'Must be greater than zero.',
);
}
}