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

Method post

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

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

Source from the content-addressed store, hash-verified

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

Callers 7

08-cache.spec.jsFile · 0.80
05-models.spec.jsFile · 0.80
01-user.spec.jsFile · 0.80
postFunction · 0.80

Calls 3

resolveMiddlewaresFunction · 0.90
addHandlerMethod · 0.80
pushCustomMethod · 0.80

Tested by

no test coverage detected