streamAsFlow

Calls the function with data and streams its response: a StreamResponse.Message for every chunk the function sends while it runs, then a StreamResponse.Result with its return value, after which the flow completes. A failed call fails the flow with a FirebaseFunctionsException.

The multiplatform counterpart of the Android SDK's stream(data), whose org.reactivestreams.Publisher common code cannot name; shipped on Android and the JVM too (see keepClasses in the build file). Not available on Apple platforms, where the iOS SDK's streaming API is Swift-only, or on the JVM with a firebase-java-sdk older than 0.7.0: there the flow fails with an UnsupportedOperationException.

Fails: the iOS SDK's streaming API (Callable.stream) is Swift-only, which Kotlin/Native cannot call.

expect fun HttpsCallableReference.streamAsFlow(data: Any? = null): Flow<StreamResponse>(source)

Calls the function with data and streams its response: a StreamResponse.Message for every chunk the function sends while it runs, then a StreamResponse.Result with its return value, after which the flow completes. A failed call fails the flow with a FirebaseFunctionsException.

The multiplatform counterpart of the Android SDK's stream(data), whose org.reactivestreams.Publisher common code cannot name; shipped on Android and the JVM too (see keepClasses in the build file). Not available on Apple platforms, where the iOS SDK's streaming API is Swift-only, or on the JVM with a firebase-java-sdk older than 0.7.0: there the flow fails with an UnsupportedOperationException.

Over the JS SDK's callable.stream(data): its async iterable of chunks, then its data promise.

Over the JS SDK's callable.stream(data): its async iterable of chunks, then its data promise.