(pattern: string, handler: RouteHandler)
| 59 | } |
| 60 | |
| 61 | options(pattern: string, handler: RouteHandler): void { |
| 62 | this.register("OPTIONS", pattern, handler); |
| 63 | } |
| 64 | |
| 65 | async route(req: HTTPRequestLike, res: HTTPResponseLike): Promise<boolean> { |
| 66 | const pathname = parseRequestUrl(req).pathname; |