Skip to content

Add onBytesReceived callback to consolidateHttpClientResponseBytes() - #32853

Merged
tvolkert merged 2 commits into
flutter:masterfrom
tvolkert:response_bytes
May 20, 2019
Merged

tvolkert merged 2 commits into
flutter:masterfrom
tvolkert:response_bytes

Conversation

@tvolkert

Copy link
Copy Markdown
Contributor

Description

This will allow us to plumb the byte chunks in a chunked
network response up to the higher levels of the framework
to notify interested parties of network loading progress.

Related Issues

#32374

Tests

I added the following tests:

  • Verification that the onBytesReceived callback is invoked correctly.
  • Verification that the method handles the gzip permutations correctly.
  • Verification that if the callback throws, the error propagates to the future that is returned by the function.

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I signed the [CLA].
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require Flutter developers to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (Please read [Handling breaking changes]). Replace this with a link to the e-mail where you asked for input on this proposed change.
  • No, this is not a breaking change.

@tvolkert tvolkert mentioned this pull request May 16, 2019
8 of 9 tasks
@tvolkert
tvolkert requested a review from Hixie May 16, 2019 23:54
This will allow us to plumb the chunks in a chunked response
up to the higher levels of the framework to notify interested
parties of network loading progress.

#32374
@Hixie

Hixie commented May 17, 2019

Copy link
Copy Markdown
Contributor

cc @goderbauer

@tvolkert
tvolkert requested a review from goderbauer May 17, 2019 00:18
@tvolkert tvolkert mentioned this pull request May 17, 2019
8 of 9 tasks
@Piinks Piinks added a: images Loading, displaying, rendering images framework flutter/packages/flutter repository. See also f: labels. labels May 18, 2019

@goderbauer goderbauer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread packages/flutter/lib/src/foundation/consolidate_response.dart Outdated
Comment thread packages/flutter/lib/src/foundation/consolidate_response.dart Outdated
@tvolkert
tvolkert merged commit 8eb7b72 into flutter:master May 20, 2019
@tvolkert
tvolkert deleted the response_bytes branch May 20, 2019 23:43
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

a: images Loading, displaying, rendering images framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants