Skip to content

Support both the console and browser equally #20068

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nex3 opened this issue Jul 15, 2014 · 5 comments
Closed

Support both the console and browser equally #20068

nex3 opened this issue Jul 15, 2014 · 5 comments
Assignees
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. type-enhancement A request for a change that isn't a bug

Comments

@nex3
Copy link
Member

nex3 commented Jul 15, 2014

The http package should support IOClient and BrowserClient on even footing. "new http.Client()" should dynamically choose between them based on which is supported.

@nex3
Copy link
Member Author

nex3 commented Jul 15, 2014

Marked this as being blocked by #6943.

@DartBot
Copy link

DartBot commented Aug 9, 2014

This comment was originally written by [email protected]


This would be awesome.

In my particular case I'm building a client library for a Rest service. My first priority is to build a CLI application using the Client and for that purpose I will need to use the dart:io's HttpRequest. But I want to reuse the Client lib for a Web Interface later on and will then need to use dart:html's HttpRequest.

In order to make that work I have to build wrappers for each HttpRequests.

@nex3
Copy link
Member Author

nex3 commented Aug 11, 2014

It's worth noting that you can use the http package on both the browser and the console today; you just need to explicitly choose to instantiate either an IOClient or a BrowserClient and pass it in to the code in question.

@DartBot
Copy link

DartBot commented Aug 12, 2014

This comment was originally written by [email protected]


Huh. Why didn't I notice that until now? Please excuse a newbie. :)

Reading "http package" I was just thinking of some future http functionality - I didn't know it was a package that already existed. Thank you for guiding me.

@nex3 nex3 added Type-Enhancement area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. labels Aug 12, 2014
@nex3 nex3 self-assigned this Aug 12, 2014
@DartBot
Copy link

DartBot commented Jun 5, 2015

This issue has been moved to dart-lang/http#22.

@DartBot DartBot closed this as completed Jun 5, 2015
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed priority-unassigned labels Mar 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

3 participants