-
-
Couldn't load subscription status.
- Fork 118
Open
Labels
Description
Starting with a discussion in #41, we need to come up with a new api for specifying the http method[s] for a handler. Here are a few examples:
router.methods('GET', 'POST').use('/', function () {});router.use(['GET', 'POST'], '/', function () {})router.route('/').methods('GET', 'POST').handler(function () {})router.route(['GET', 'POST'], '/').handler(function () {})
All of these are fairly consistent from the current API in my opinion, despite being breaking changes in a few cases. Numbers 1 & 3 are not breaking changes AFAIK since they are just adding new methods. Thoughts?