Chunked transfer encoding sends a response incrementally instead of waiting for one predetermined-length body. The server divides available data into chunks, allowing the client to process and display content as it arrives. section 3.2.1
A streaming response follows this sequence:
- The client requests a streaming response. section 3.2.1
- The server begins processing and sends available data without waiting for the complete response. section 3.2.1
- Each chunk carries its size, its data, and a newline; the client reads chunks sequentially. section 3.2.1
- A zero-length chunk marks the end, after which the client concludes the stream. section 3.2.1
1F\r\n Hello, world! This is an ex \r\n 1D\r\n ample of chunked transfer encoding. \r\n 0\r\n \r\n
Inspect a wire-format example showing chunk sizes, separated payloads, and the terminating zero-length chunk. section 3.2.1
