options method
void
options(
- String path,
- BloomRouteHandler handler, {
- List<
BloomMiddleware> middlewares = const [],
Registers an OPTIONS route for path handled by handler with optional route-scoped middlewares.
Example
router.options('/api/items', (req) async => BloomResponse.noContent());
Implementation
void options(String path, BloomRouteHandler handler,
{List<BloomMiddleware> middlewares = const []}) {
_addRoute('OPTIONS', path, handler, middlewares);
}