postToConnection method
Sends the provided data to the specified connection.
May throw ForbiddenException.
May throw GoneException.
May throw LimitExceededException.
May throw PayloadTooLargeException.
Parameter connectionId :
The identifier of the connection that a specific client is using.
Parameter data :
The data to be sent to the client specified by its connection id.
Implementation
Future<void> postToConnection({
required String connectionId,
required Uint8List data,
}) async {
await _protocol.send(
payload: data,
method: 'POST',
requestUri: '/%40connections/${Uri.encodeComponent(connectionId)}',
exceptionFnMap: _exceptionFns,
);
}