ApiClient class
Methods
-
addRoute(HttpMethod method, String path, dynamic handler, {List<Middleware>? middlewares})
→ void
-
-
close()
→ Future<void>
-
-
configureDevelopment(DevelopmentConfig config)
→ void
-
-
configureDocs(DocsConfig config)
→ void
-
-
delete(String path, dynamic handler)
→ void
-
-
enableDevelopmentMode({bool showBanner = true, bool logRequests = true, bool logErrors = true, bool includeStackTrace = true, bool showEndpoints = true, bool enableDocs = true})
→ void
-
-
get(String path, dynamic handler)
→ void
-
-
getLearnedSchema(String method, String path)
→ Map<String, dynamic>?
-
Get learned schema for a route
-
head(String path, dynamic handler)
→ void
-
-
listen({String host = 'localhost', int port = 8080, bool shared = false})
→ Future<HttpServer>
-
-
listenDev({String host = 'localhost', int port = 8080, bool shared = false, DevelopmentConfig? devConfig, bool autoFindPort = true})
→ Future<HttpServer>
-
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
options(String path, dynamic handler)
→ void
-
-
patch(String path, dynamic handler)
→ void
-
-
patchWithOptionalValidation<T extends GliderModel>(String path, T constructor(), RouteHandlerWithRequest handler)
→ void
-
Patch route with optional validation - only validates if required data is provided
-
post<T extends GliderModel>(String path, RouteHandlerWithRequest handler, {T constructor()?})
→ void
-
Post route. If
constructor is provided, optional validation middleware runs; otherwise it's a simple handler.
-
put(String path, dynamic handler)
→ void
-
Put route (simple handler, no typed data). Use this for minimal inline validation.
-
putWithData<T>(String path, T constructor(Map<String, dynamic>), RouteHandlerWithData<T> handler)
→ void
-
Put route with automatic JSON deserialization to typed data
-
putWithOptionalValidation<T extends GliderModel>(String path, T constructor(), RouteHandlerWithRequest handler)
→ void
-
Put route with optional validation - only validates if required data is provided
-
registerModel<T extends GliderModel>(String name, T constructor())
→ void
-
Register a model for automatic schema generation in API docs
-
toString()
→ String
-
A string representation of this object.
inherited
-
use(Middleware middleware)
→ void
-