LiteServer class

Constructors

LiteServer.new({List<HttpRoute> routes = const [], void onRouteNotFound(HttpRequest request)?, void onError(HttpRequest request, Object? error, StackTrace stackTrace)?})

Properties

controllers List<HttpController>
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
onError → void Function(HttpRequest request, Object? error, StackTrace stackTrace)?
final
onRouteNotFound → void Function(HttpRequest request)?
final
routeMap Map<String, _HttpRouteMapper>
final
routes List<HttpRoute>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

findRoute(HttpRequest request) → (_HttpRouteMapper?, Map<String, String>)
generateRouteMap() → void
listen(HttpServer server, {List<HttpController> controllers = const [], void onError(HttpRequest request, Object? error, StackTrace stackTrace)?}) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
requestHandler(HttpRequest request) Future<void>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited