handleHttpRequest method
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;
}