MCPcopy Index your code
hub / github.com/nodejs/node / newParser

Function newParser

benchmark/http/bench-parser-fragmented.js:35–47  ·  view source on GitHub ↗
(type)

Source from the content-addressed store, hash-verified

33 }
34
35 function newParser(type) {
36 const parser = new HTTPParser();
37 parser.initialize(type, {});
38
39 parser.headers = [];
40
41 parser[kOnHeaders] = function() { };
42 parser[kOnHeadersComplete] = function() { };
43 parser[kOnBody] = function() { };
44 parser[kOnMessageComplete] = function() { };
45
46 return parser;
47 }
48
49 // Build the header
50 let header = `GET /hello HTTP/1.1\r\nContent-Type: text/plain\r\n`;

Callers 1

processHeaderFragmentedFunction · 0.70

Calls 1

initializeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…