Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: pkg/http/lib/src/io_client.dart

Issue 11308111: Refactor http.Client and http.BaseClient to allow http.Client in type annotations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Small fix Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/http/lib/src/client.dart ('k') | pkg/oauth2/lib/src/authorization_code_grant.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/http/lib/src/io_client.dart
diff --git a/pkg/http/lib/src/client.dart b/pkg/http/lib/src/io_client.dart
similarity index 77%
copy from pkg/http/lib/src/client.dart
copy to pkg/http/lib/src/io_client.dart
index bbee58d2744fa5b7e7bd67b716d4745163160291..995ff3b1d9e60cf163af424b3ba769110056932c 100644
--- a/pkg/http/lib/src/client.dart
+++ b/pkg/http/lib/src/io_client.dart
@@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-library client;
+library io_client;
import 'dart:io';
@@ -11,21 +11,13 @@ import 'base_request.dart';
import 'streamed_response.dart';
import 'utils.dart';
-/// An HTTP client which takes care of maintaining persistent connections across
-/// multiple requests to the same server. If you only need to send a single
-/// request, it's usually easier to use [head], [get], [post],
-/// [put], or [delete] instead.
-///
-/// When creating an HTTP client class with additional functionality, it's
-/// recommended that you subclass [BaseClient] and wrap another instance of
-/// [BaseClient] rather than subclassing [Client] directly. This allows all
-/// subclasses of [BaseClient] to be mutually composable.
-class Client extends BaseClient {
+/// A `dart:io`-based HTTP client. This is the default client.
+class IOClient extends BaseClient {
/// The underlying `dart:io` HTTP client.
HttpClient _inner;
/// Creates a new HTTP client.
- Client() : _inner = new HttpClient();
+ IOClient() : _inner = new HttpClient();
/// Sends an HTTP request and asynchronously returns the response.
Future<StreamedResponse> send(BaseRequest request) {
« no previous file with comments | « pkg/http/lib/src/client.dart ('k') | pkg/oauth2/lib/src/authorization_code_grant.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698