THttpRawResponseStream Class
TStream that writes raw bytes directly to the response transport, applying chunked transfer encoding when the response is chunked.
Remarks
This is the low-level stream behind the default response body writer. It builds chunk headers, buffers small writes up to THttpServerResponse.MinChunkSize, and emits the terminating chunk on Flush. The stream is read-only for reads and cannot seek to an arbitrary position.
Syntax
Unit: Sparkle.HttpServer.Response
THttpRawResponseStream = class(TStream);
Constructors
| Name | Description |
|---|---|
| Create | Creates the raw response stream bound to the given response. |
Methods
| Name | Description |
|---|---|
| Flush | Flushes buffered chunk data and, for a chunked response, emits the terminating empty chunk. |
| Read | Not supported. The raw response stream is write-only. |
| Seek | Reports the current position but does not allow moving to an arbitrary position. |
| Write | Writes Count bytes from Buffer to the client, sending headers first if needed. |