Lesson 10.1

The seam - deliver the Request before the body arrives

Buffering the whole body is a dead end for big and unknown-length uploads. A Readable funnel lets the parser hand off a Request at headers-complete while the body is still streaming in.

30 minsrc/request.js
  • Explain what a code seam is and which contract this one holds still.
  • Describe the two-step delivery - Request at headers-complete, body afterward.
  • Turn req.buffer() and req.text() into drains over a body Readable without changing their signatures.
Locked

This chapter is part of the framework capstone. Chapters 1 and 2 are free to build - unlock the rest to keep going.

Unlock the depth