MCPcopy Index your code
hub / github.com/nodejs/llhttp / checkMethod

Method checkMethod

src/llhttp/http.ts:467–479  ·  view source on GitHub ↗
(methods: IntDict, error: string)

Source from the content-addressed store, hash-verified

465 );
466
467 const checkMethod = (methods: IntDict, error: string): Node => {
468 const success = n('req_after_protocol');
469 const failure = p.error(ERROR.INVALID_CONSTANT, error);
470
471 const map: Record<number, Node> = {};
472 for (const method of Object.keys(methods)) {
473 map[methods[method]] = success;
474 }
475
476 return this.span.protocol.end(
477 this.invokePausable('on_protocol_complete', ERROR.CB_PROTOCOL_COMPLETE, this.load('method', map, failure)),
478 );
479 };
480
481 n('req_http_start')
482 .match(' ', n('req_http_start'))

Callers

nothing calls this directly

Calls 2

invokePausableMethod · 0.95
loadMethod · 0.95

Tested by

no test coverage detected