shelf_router
A convenient request router for the shelf web-framework, with support for URL-parameters, nested routers and routers generated from source annotations.
1.1.4
341K downloads/mo
#638 most downloaded on pub.dev
dart-lang/shelf
What this package is like to depend on
Last release 3 years ago
no release in 18 months
Ships fairly regularly
a new release about every 4 months
Nearly every release is documented
notes for 12 of 12 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
12 releases · first in 2019
0 releases in the last 12 months
see the full history below
Release timeline
12 releases · Mar 2019 to May 2023Releases
latest 12-
1.1.403 May 2023Release notes
Open source →- Fixed a spelling issue in the pubspec file.
- Added package topics to the pubspec file.
- Require Dart >=2.17.
-
1.1.316 Jun 2022Release notes
Open source →- Require
analyzer: ^8.1.1 - Require
build: ^4.0.0 - Require
build_config: ^1.2.0 - Require
source_gen: ^4.0.1 - Require
sdk: ^3.9.0
- Require
-
1.1.202 Nov 2021Release notes
Open source →- Require
analyzer: '>=7.4.0 <9.0.0' - Require
build: ^3.0.0 - Require
build_config: ^1.1.0 - Require
source_gen: ^3.0.0 - Require
sdk: ^3.7.0
- Require
-
1.1.115 Jul 2021Release notes
Open source →- Support the latest
package:analyzerandpackage:source_gen - Require
sdk: ^3.3.0
- Support the latest
-
1.1.007 Jul 2021Release notes
Open source →paramsis deprecated in favor ofRequest.paramsadding using an extension onRequest.- The default
notFoundHandlernow returns a sentinelrouteNotFoundresponse object which causes 404 with the message 'Route not found'. - Minor breaking: Handlers and sub-routers that return the sentinel
routeNotFoundresponse object will be ignored and pattern matching will continue on additional routes/handlers.
Changing the router to continue pattern matching additional routes if a matched handler or nested router returns the sentinel
routeNotFoundresponse object is technically a breaking change. However, it only affects scenarios where the request matches a mounted sub-router, but does not match any route on this sub-router. In this case,shelf_routerversion1.0.0would immediately respond 404, without attempting to match further routes. With this release, the behavior changes to matching additional routes until one returns a custom 404 response object, or all routes have been matched.This behavior is more in line with how
shelf_routerversion0.7.xworked, and since many affected users consider the behavior from1.0.0a defect, we decided to remedy the situation. -
1.0.008 Mar 2021Release notes
Open source →- Migrate package to null-safety
- Since handlers are not allowed to return
nullinshelf1.0.0, a router will return a default 404 response instead. This behavior can be overridden with thenotFoundHandlerconstructor parameter. - Breaking: Remove deprecated
Router.handlergetter. The router itself is a handler.
-
0.7.411 Dec 2020Release notes
Open source →- Update
Router.mountparameter to accept aHandler. - Make
Routerto be considered aHandler. - Deprecate the
Router.handlergetter.
- Update
-
0.7.303 Nov 2020 -
0.7.208 Jan 2020Release notes
Open source →- Always register a
HEADhandler whenever aGEThandler is registered. Defaulting to calling theGEThandler and throwing away the body.
- Always register a
-
0.7.128 May 2019 -
0.7.022 Mar 2019 -
0.7.0+122 Mar 2019