| 1 |
import RouteRecognizer from 'route-recognizer'; |
| 2 |
|
| 3 |
/** |
| 4 |
* Registry |
| 5 |
* |
| 6 |
* A registry is a map of HTTP verbs to route recognizers. |
| 7 |
*/ |
| 8 |
export default class Registry { |
| 9 |
|
| 10 |
public verbs; |
| 11 |
|
| 12 |
constructor(/* host */) { |
| 13 |
// Herein we keep track of RouteRecognizer instances |
| 14 |
// keyed by HTTP method. Feel free to add more as needed. |
| 15 |
this.verbs = { |
| 16 |
GET: new RouteRecognizer(), |
| 17 |
PUT: new RouteRecognizer(), |
| 18 |
POST: new RouteRecognizer(), |
| 19 |
DELETE: new RouteRecognizer(), |
| 20 |
PATCH: new RouteRecognizer(), |
| 21 |
HEAD: new RouteRecognizer(), |
| 22 |
OPTIONS: new RouteRecognizer() |
| 23 |
}; |
| 24 |
} |
| 25 |
} |
| 26 |
|