handleHttpRequest method

  1. @override
Future<bool> handleHttpRequest(
  1. HttpRequest req
)
override

You’ll also want some hook so the HTTP server can pass requests here.

Implementation

@override
Future<bool> handleHttpRequest(HttpRequest req) async {
  if (req.uri.path == path) {
    return await super.handleHttpRequest(req);
  }
  return false;
}