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

Method constructor

packages/router/src/index.ts:197–201  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

195 unsubscribe: RIM<Req, Res, this>
196
197 constructor() {
198 for (const m of METHODS) {
199 this[m.toLowerCase()] = this.add(m as Method)
200 }
201 }
202
203 add(method: Method) {
204 return (...args: RouterMethodParams<Req, Res>) => {

Callers

nothing calls this directly

Calls 1

addMethod · 0.95

Tested by

no test coverage detected