This commit is contained in:
2025-07-28 22:50:12 +00:00
parent eb2ccd8d9f
commit 8e75047d1f
6 changed files with 53 additions and 5 deletions

View File

@@ -37,4 +37,9 @@ export abstract class CoreResponse<T = any> implements types.ICoreResponse<T> {
* Get response as ArrayBuffer
*/
abstract arrayBuffer(): Promise<ArrayBuffer>;
/**
* Get response as a web-style ReadableStream
*/
abstract stream(): ReadableStream<Uint8Array> | null;
}

View File

@@ -77,4 +77,5 @@ export interface ICoreResponse<T = any> {
json(): Promise<T>;
text(): Promise<string>;
arrayBuffer(): Promise<ArrayBuffer>;
stream(): ReadableStream<Uint8Array> | null; // Always returns web-style stream
}