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

Method build

src/llhttp/http.ts:231–260  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

229 }
230
231 public build(): IHTTPResult {
232 const p = this.llparse;
233
234 p.property('i64', 'content_length');
235 p.property('i8', 'type');
236 p.property('i8', 'method');
237 p.property('i8', 'http_major');
238 p.property('i8', 'http_minor');
239 p.property('i8', 'header_state');
240 p.property('i16', 'lenient_flags');
241 p.property('i8', 'upgrade');
242 p.property('i8', 'finish');
243 p.property('i16', 'flags');
244 p.property('i16', 'status_code');
245 p.property('i8', 'initial_message_completed');
246
247 // Verify defaults
248 assert.strictEqual(FINISH.SAFE, 0);
249 assert.strictEqual(TYPE.BOTH, 0);
250
251 // Shared settings (to be used in C wrapper)
252 p.property('ptr', 'settings');
253
254 this.buildLine();
255 this.buildHeaders();
256
257 return {
258 entry: this.node('start'),
259 };
260 }
261
262 private buildLine(): void {
263 const p = this.llparse;

Callers 2

buildNodeFunction · 0.95
buildLineMethod · 0.45

Calls 3

buildLineMethod · 0.95
buildHeadersMethod · 0.95
nodeMethod · 0.95

Tested by

no test coverage detected