MCPcopy Create free account
hub / github.com/axe-api/axe-api / get

Method get

packages/axe-api/src/Services/App.ts:74–78  ·  view source on GitHub ↗

* 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[])

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

resolveMiddlewaresFunction · 0.90
addHandlerMethod · 0.80
pushCustomMethod · 0.80

Tested by

no test coverage detected