Class ResponseHeaders
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
innerIResultheadersIReadOnlyList<KeyValuePair<string, string>>
Methods
ExecuteAsync(HttpContext)
Write an HTTP response reflecting the result.
public Task ExecuteAsync(HttpContext httpContext)
Parameters
httpContextHttpContextThe HttpContext for the current request.
Returns
- Task
A task that represents the asynchronous execute operation.