BREAKING CHANGE(client/streaming): Unify streaming APIs: remove raw()/streamNode() and standardize on web ReadableStream across runtimes
This commit is contained in:
@@ -72,20 +72,6 @@ export class CoreResponse<T = any>
|
||||
return this.response.body;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get response as a Node.js-style stream
|
||||
* Bun supports Node.js streams, so we can provide this functionality
|
||||
*
|
||||
* Note: In Bun, you may also be able to use the web stream directly with stream() method
|
||||
*/
|
||||
streamNode(): never {
|
||||
// Bun primarily uses web streams and has excellent compatibility
|
||||
// For most use cases, use stream() which returns a standard ReadableStream
|
||||
throw new Error(
|
||||
'streamNode() is not available in Bun environment. Use stream() for web-style ReadableStream, which Bun fully supports.',
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the raw Response object
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user