* Add a POST request handler with middleware support * * @param url * @param args * @example * app.post( * "/api/v1/health", * myHandler, * async (req: AxeRequest, res: AxeResponse) => { * res.json({}); * } * );
(url: string, ...args: GeneralFunction[])
| 92 | * ); |
| 93 | */ |
| 94 | public post(url: string, ...args: GeneralFunction[]) { |
| 95 | const { handler, middlewares } = resolveMiddlewares(args); |
| 96 | URLService.addHandler("POST", url, handler, middlewares); |
| 97 | this.docs.pushCustom(HttpMethods.POST, url); |
| 98 | } |
| 99 | |
| 100 | /** |
| 101 | * Add a PUT request handler with middleware support |
no test coverage detected