Table of Contents

THttpServerResponseStream Class

TStream exposed as the response's public Content stream, forwarding writes to the response's current RawWriter.

Remarks

Unlike THttpRawResponseStream, which writes to the transport, this stream routes body data through the writer configured on the response, so middleware that replaces RawWriter can intercept the body.

Syntax

Unit: Sparkle.HttpServer.Response

THttpServerResponseStream = class(TStream);

Constructors

Name Description
Create Creates the content stream bound to the given response.

Methods

Name Description
Read Not supported. The response content 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 response body, sending headers first if needed.