(method, path, host)
| 382 | } |
| 383 | |
| 384 | match(method, path, host) { |
| 385 | |
| 386 | Hoek.assert(method && typeof method === 'string', 'Invalid method:', method); |
| 387 | Hoek.assert(path && typeof path === 'string' && path[0] === '/', 'Invalid path:', path); |
| 388 | Hoek.assert(!host || typeof host === 'string', 'Invalid host:', host); |
| 389 | |
| 390 | const match = this._core.router.route(method.toLowerCase(), path, host); |
| 391 | Hoek.assert(match !== this._core.router.specials.badRequest, 'Invalid path:', path); |
| 392 | if (match === this._core.router.specials.notFound) { |
| 393 | return null; |
| 394 | } |
| 395 | |
| 396 | return match.route.public; |
| 397 | } |
| 398 | |
| 399 | method(name, method, options = {}) { |
| 400 |
no test coverage detected