MCPcopy Create free account
hub / github.com/tinyhttp/tinyhttp / msearch

Method msearch

packages/router/src/index.ts:218–230  ·  view source on GitHub ↗
(...args: RouterMethodParams<Req, Res>)

Source from the content-addressed store, hash-verified

216 }
217
218 msearch(...args: RouterMethodParams<Req, Res>) {
219 const handlers = args.slice(1).flat() as Handler<Req, Res>[]
220
221 pushMiddleware<Req, Res>(this.middleware)({
222 path: args[0],
223 handler: handlers[0],
224 handlers: handlers.slice(1),
225 method: 'M-SEARCH',
226 type: 'route'
227 })
228
229 return this
230 }
231
232 all(...args: RouterMethodParams<Req, Res>) {
233 const handlers = args.slice(1).flat() as Handler<Req, Res>[]

Callers 1

router.test.tsFile · 0.80

Calls 1

pushMiddlewareFunction · 0.85

Tested by

no test coverage detected