Handler for incoming requests. Returns the result to send back.
typedef RequestHandler = Future<dynamic> Function(String method, dynamic params);