Struct StreamingProxyResult
Pairs a synthetic response (status and headers) with a delegate that writes the body on the fly. Pass to RespondStreaming(StreamingProxyResult, bool) to stream without buffering the whole body in memory.
Implements
Inherited Members
Namespace: Titanium.Web.Proxy.Http
Assembly: Titanium.Web.Proxy.dll
Syntax
public readonly record struct StreamingProxyResult : IEquatable<StreamingProxyResult>
Constructors
| Edit this page View SourceStreamingProxyResult(Response, Func<Stream, CancellationToken, Task>)
Pairs a synthetic response (status and headers) with a delegate that writes the body on the fly. Pass to RespondStreaming(StreamingProxyResult, bool) to stream without buffering the whole body in memory.
Declaration
public StreamingProxyResult(Response Response, Func<Stream, CancellationToken, Task> WriteBody)
Parameters
| Type | Name | Description |
|---|---|---|
| Response | Response | Response metadata (status, headers, optional Content-Length). |
| Func<Stream, CancellationToken, Task> | WriteBody | Delegate invoked to write the body to the client stream. |
Properties
| Edit this page View SourceResponse
Response metadata (status, headers, optional Content-Length).
Declaration
public Response Response { get; init; }
Property Value
| Type | Description |
|---|---|
| Response |
WriteBody
Delegate invoked to write the body to the client stream.
Declaration
public Func<Stream, CancellationToken, Task> WriteBody { get; init; }
Property Value
| Type | Description |
|---|---|
| Func<Stream, CancellationToken, Task> |