{"action":"created","issue":{"url":"https://api.github.com/repos/apsavin/router-base/issues/13","labels_url":"https://api.github.com/repos/apsavin/router-base/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/apsavin/router-base/issues/13/comments","events_url":"https://api.github.com/repos/apsavin/router-base/issues/13/events","html_url":"https://github.com/apsavin/router-base/issues/13","id":98004624,"number":13,"title":"Provide possibility to pass defaultMethods as false","user":{"login":"jifeon","id":384223,"avatar_url":"https://avatars.githubusercontent.com/u/384223?v=3","gravatar_id":"","url":"https://api.github.com/users/jifeon","html_url":"https://github.com/jifeon","followers_url":"https://api.github.com/users/jifeon/followers","following_url":"https://api.github.com/users/jifeon/following{/other_user}","gists_url":"https://api.github.com/users/jifeon/gists{/gist_id}","starred_url":"https://api.github.com/users/jifeon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jifeon/subscriptions","organizations_url":"https://api.github.com/users/jifeon/orgs","repos_url":"https://api.github.com/users/jifeon/repos","events_url":"https://api.github.com/users/jifeon/events{/privacy}","received_events_url":"https://api.github.com/users/jifeon/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-29T18:52:56Z","updated_at":"2015-07-30T08:46:50Z","closed_at":"2015-07-29T19:59:43Z","body":"I want a router which just generates and parses URLs, without any methods. In other words I want following code works:\r\n\r\n```js\r\n\r\nvar router = new RouterBase({\r\n  routes: [{\r\n    id: 'test',\r\n    path: '/{a}'\r\n  }]\r\n});\r\n\r\nasserts(router.generate('test', {a: 42}) === '/42');\r\nasserts(router.match({path: '/42'}).id === 'test');\r\n```\r\n\r\nBut second assertion throws an error, because HTTP method is not passed to match.  Of course I can pass `[undefined]` as `defaulMethods` while router initialization but it's a piece of boar sh*t. So I propose to allow router to get `defaulMethods` as `false`. In this case router should turn mothod's check off.\r\n\r\nAlso I want shortcut for `match` method which will accept argument as string. Like that:\r\n```js\r\nrouter.match('/42')\r\n```"},"comment":{"url":"https://api.github.com/repos/apsavin/router-base/issues/comments/126229411","html_url":"https://github.com/apsavin/router-base/issues/13#issuecomment-126229411","issue_url":"https://api.github.com/repos/apsavin/router-base/issues/13","id":126229411,"user":{"login":"apsavin","id":632171,"avatar_url":"https://avatars.githubusercontent.com/u/632171?v=3","gravatar_id":"","url":"https://api.github.com/users/apsavin","html_url":"https://github.com/apsavin","followers_url":"https://api.github.com/users/apsavin/followers","following_url":"https://api.github.com/users/apsavin/following{/other_user}","gists_url":"https://api.github.com/users/apsavin/gists{/gist_id}","starred_url":"https://api.github.com/users/apsavin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apsavin/subscriptions","organizations_url":"https://api.github.com/users/apsavin/orgs","repos_url":"https://api.github.com/users/apsavin/repos","events_url":"https://api.github.com/users/apsavin/events{/privacy}","received_events_url":"https://api.github.com/users/apsavin/received_events","type":"User","site_admin":false},"created_at":"2015-07-30T08:46:50Z","updated_at":"2015-07-30T08:46:50Z","body":"All you need is:\r\n```js\r\nRB.prototype.match = function(request) {\r\n  if (typeof request === 'string') {request = {path: request, method: 'GET'};}\r\n  return super(request);\r\n}\r\n```"}}