createCall<Q, R> method
- ClientMethod<
Q, R> method, - Stream<
Q> requests, - CallOptions options
override
Initiates a new RPC on this connection.
Implementation
@override
ClientCall<Q, R> createCall<Q, R>(ClientMethod<Q, R> method, Stream<Q> requests, CallOptions options) {
if (!SessionsClient.unallowedMethods.contains(method.path) && _sessionId != null) {
options = options.mergedWith(CallOptions(metadata: {SessionsClient.sessionMetadataKey: _sessionId!()}));
}
options = options.mergedWith(CallOptions(metadata: {'Authorization': 'Bearer $accessToken'}));
options = options.mergedWith(CallOptions(metadata: {'viam_client': getVersionMetadata()}));
return super.createCall(method, requests, options);
}