Table of Contents

Class TextResponse

Namespace
Olve.TypeSpec
Assembly
Olve.TypeSpec.dll

Writes a generated response variant's text body (a string with a text/* content type) as UTF-8, as is: not as a JSON string.

public sealed class TextResponse : IResult
Inheritance
TextResponse
Implements
Inherited Members

Constructors

TextResponse(string, string, int)

Writes a generated response variant's text body (a string with a text/* content type) as UTF-8, as is: not as a JSON string.

public TextResponse(string text, string contentType, int status)

Parameters

text string
contentType string
status int

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.