Skip to content

Investigate patching dart-lang/http to be Flutter compatible. #5831

Closed

Description

@chinmaygarde

Since we are deprecating the Mojo networking stack in Flutter, users will have to rely on dart:io directly. It has been reported that dart:io is quite a bit more low level than necessary for common use cases. dart-lang/http is a suitable wrapper around dart:io but is not compatible with Flutter because of its use of mirrors.

We should investigate strategies to make dart-lang/http usable from Flutter. Either by providing patches to the canonical repo or forking the same.

Activity

  1. abarth commented on Sep 12, 2016

    @abarth
    Contributor

    In the meantime, we can just re-host package:flutter/http.dart on top of dart:io. It's already a fork of dart-lang/http code, so we can probably borrow their dart:io backend.

  2. chinmaygarde commented on Sep 12, 2016

    @chinmaygarde
    ContributorAuthor

    In the meantime, we can just re-host package:flutter/http.dart on top of dart:io. It's already a fork of dart-lang/http code, so we can probably borrow their dart:io backend.

    sgtm as an interim solution.

  3. sethladd commented on Sep 12, 2016

    @sethladd
    Contributor

    We might also want to update our copy of http. See #5370

  4. abarth commented on Sep 12, 2016

    @abarth
    Contributor

    How about this for a plan:

    • Remove mojo-specific entry points to package:flutter/http.dart
    • Re-host package:flutter/http.dart on dart:io
    • Either remove package:flutter/http.dart in favor of package:http/http.dart or update package:flutter/http.dart.
  5. collinjackson commented on Sep 12, 2016

    @collinjackson
    Contributor

    Does our dart:io do HTTPS properly yet?

  6. abarth commented on Sep 12, 2016

    @abarth
    Contributor

    I believe it does. We should check that first before trying to migrate to it.

  7. chinmaygarde commented on Sep 12, 2016

    @chinmaygarde
    ContributorAuthor

    I know it works on iOS. Pretty sure Android is fine too. Will follow up with the Dart ninjas if not.

  8. chinmaygarde commented on Sep 13, 2016

    @chinmaygarde
    ContributorAuthor

    I forked dart-lang/http.dart and got rid of its use of mirrors and use dart:io directly: https://github.com/chinmaygarde/flutter_http. Seems to work fine. Patching our use of accessing data from an image pipe now.

  9. removed their assignment
    on Sep 14, 2016
  10. chinmaygarde commented on Nov 29, 2016

    @chinmaygarde
    ContributorAuthor

    This is being tracked in dart-lang/http#1. Closing.

  11. github-actions commented on Sep 5, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  12. locked as resolved and limited conversation to collaborators on Sep 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

c: API breakBackwards-incompatible API changescustomer: fast (g3)frameworkflutter/packages/flutter repository. See also f: labels.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions