* Add a GET request handler with middleware support * * @param url * @param args * @example * app.get( * "/api/v1/health", * myHandler, * async (req: AxeRequest, res: AxeResponse) => { * res.json({}); * } * );
(url: string, ...args: GeneralFunction[])
| 72 | * ); |
| 73 | */ |
| 74 | public get(url: string, ...args: GeneralFunction[]) { |
| 75 | const { handler, middlewares } = resolveMiddlewares(args); |
| 76 | URLService.addHandler("GET", url, handler, middlewares); |
| 77 | this.docs.pushCustom(HttpMethods.GET, url); |
| 78 | } |
| 79 | |
| 80 | /** |
| 81 | * Add a POST request handler with middleware support |
nothing calls this directly
no test coverage detected