Skip to content

feat(cronet_http): support streaming request bodies on StreamedRequest#1941

Open
hasanmhallak wants to merge 1 commit into
dart-lang:masterfrom
hasanmhallak:stream-request-cronet
Open

feat(cronet_http): support streaming request bodies on StreamedRequest#1941
hasanmhallak wants to merge 1 commit into
dart-lang:masterfrom
hasanmhallak:stream-request-cronet

Conversation

@hasanmhallak

Copy link
Copy Markdown
Contributor
  • Add streaming upload support for StreamedRequest in CronetClient using Cronet's UploadDataProvider API instead of buffering the full body with stream.toBytes().
  • Introduce UploadDataProviderProxy (Kotlin) so Dart can implement Cronet's abstract UploadDataProvider via JNI, following the same pattern as UrlRequestCallbackProxy.
  • Regenerate JNI bindings for UploadDataProvider, UploadDataSink, and UploadDataProviderProxy; add package:async for StreamQueue.
  • Keep the existing in-memory upload path for Request bodies unchanged.
  • Enable streamed request body conformance tests (canStreamRequestBody: true).
  • Bump cronet_http to 1.10.0.

relevant #1084


  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

Note: The Dart team is trialing Gemini Code Assist. Don't take its comments as final Dart team feedback. Use the suggestions if they're helpful; otherwise, wait for a human reviewer.

- Add streaming upload support for `StreamedRequest` in `CronetClient` using Cronet's `UploadDataProvider` API instead of buffering the full body with `stream.toBytes()`.
- Introduce `UploadDataProviderProxy` (Kotlin) so Dart can implement Cronet's abstract `UploadDataProvider` via JNI, following the same pattern as `UrlRequestCallbackProxy`.
- Regenerate JNI bindings for `UploadDataProvider`, `UploadDataSink`, and `UploadDataProviderProxy`; add `package:async` for `StreamQueue`.
- Keep the existing in-memory upload path for `Request` bodies unchanged.
- Enable streamed request body conformance tests (`canStreamRequestBody: true`).
- Bump `cronet_http` to `1.10.0`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant