TextStreamResponse
Namespace: Vercel.AI.Util
public sealed class TextStreamResponseHTTP response whose body is a UTF-8 text stream.
Inheritance: object
Constructors
Section titled “Constructors”TextStreamResponse(int, string?, HeaderCollection, ReadableStream<byte[]>)
Section titled “TextStreamResponse(int, string?, HeaderCollection, ReadableStream<byte[]>)”public TextStreamResponse(int status, string? statusText, HeaderCollection headers, ReadableStream<byte[]> body)Creates the response.
Parameters
| Name | Type | Description |
|---|---|---|
status |
int | |
statusText |
string | |
headers |
HeaderCollection | |
body |
ReadableStream<byte\[\]> |
Properties
Section titled “Properties”public ReadableStream<byte[]> Body { get; }UTF-8 encoded body chunks.
Value: ReadableStream<byte\[\]>
Headers
Section titled “Headers”public HeaderCollection Headers { get; }Response headers, including the default content type when the caller did not set one.
Value: HeaderCollection
Status
Section titled “Status”public int Status { get; }HTTP status. Defaults to 200.
Value: int
StatusText
Section titled “StatusText”public string? StatusText { get; }HTTP status text.
Value: string
Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product