sendRequest<T extends Result?> method
Sends request to the peer, and handles coercing the response to the
type T.
Closes any progress streams for request once the response has been
received.
Implementation
Future<T> sendRequest<T extends Result?>(
String methodName, [
Request? request,
]) async {
try {
return await sendRequestKeepingProgress<T>(methodName, request);
} finally {
await closeProgress(request);
}
}