When is a Client a Client?
kevmoo opened this issue · comments
// oauth.dart
import 'package:http/http.dart'
Future authenticate(Client cleant) { ... }
We could imagine that io_client.dart
, besides providing an implementation of Client
also provides IoClient extends Client
with io-specific features.
// my vm code
import 'package:http/io_client.dart';
import 'oauth.dart';
void main() {
var client = new IoClient(cookieStore: 'cookies.cks');
authenticate(client); // is this a type warning?
}
The Client
in io_client.dart
has no relationship to Client
in http.dart
– at least not in the URI rules we think of in Dart today.
I think we can address this with something like the proposal in #5 – The external library should effectively export
the types from the canonical library.