Table of Contents

Class ResponseHeaders

Namespace
Olve.TypeSpec
Assembly
Olve.TypeSpec.dll

Sets a generated response variant's declared headers (its @header properties), then writes the variant's body. The body is registered for disposal first, so a header value the server refuses can't leak its stream. A null value (an optional header left unset) is not sent.

public sealed class ResponseHeaders : IResult
Inheritance
ResponseHeaders
Implements
Inherited Members

Constructors

ResponseHeaders(IResult, IReadOnlyList<KeyValuePair<string, string?>>)

Sets a generated response variant's declared headers (its @header properties), then writes the variant's body. The body is registered for disposal first, so a header value the server refuses can't leak its stream. A null value (an optional header left unset) is not sent.

public ResponseHeaders(IResult inner, IReadOnlyList<KeyValuePair<string, string?>> headers)

Parameters

inner IResult
headers IReadOnlyList<KeyValuePair<string, string>>

Methods

ExecuteAsync(HttpContext)

Write an HTTP response reflecting the result.

public Task ExecuteAsync(HttpContext httpContext)

Parameters

httpContext HttpContext

The HttpContext for the current request.

Returns

Task

A task that represents the asynchronous execute operation.