StreamedApiResponse class final

A streaming API response where the body is delivered as a byte stream.

Used for Server-Sent Events (SSE) and other streaming response formats. The byteStream is single-subscription - consuming it drains the underlying HTTP connection.

Constructors

StreamedApiResponse({required Stream<List<int>> byteStream, required int statusCode, Map<String, String> headers = const {}})
Creates a StreamedApiResponse with the given byteStream and metadata.
const

Properties

byteStream Stream<List<int>>
The response body as a byte stream.
final
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>
The response headers.
final
isSuccessful bool
True if status code is 2xx.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
statusCode int
The HTTP status code.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toApiResponse() Future<ApiResponse>
Buffer the entire stream into a regular ApiResponse.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited