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

Side by Side Diff: pkg/http/lib/http.dart

Issue 16019002: Merge the dart:uri library into dart:core and update the Uri class (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Final cleanup Created 7 years, 6 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /// A composable, [Future]-based library for making HTTP requests. 5 /// A composable, [Future]-based library for making HTTP requests.
6 /// 6 ///
7 /// ## Installing ## 7 /// ## Installing ##
8 /// 8 ///
9 /// Use [pub][] to install this package. Add the following to your 9 /// Use [pub][] to install this package. Add the following to your
10 /// `pubspec.yaml` file. 10 /// `pubspec.yaml` file.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 /// request.headers[HttpHeaders.USER_AGENT] = userAgent; 62 /// request.headers[HttpHeaders.USER_AGENT] = userAgent;
63 /// return _inner.send(request); 63 /// return _inner.send(request);
64 /// } 64 /// }
65 /// } 65 /// }
66 /// 66 ///
67 /// [pub]: http://pub.dartlang.org 67 /// [pub]: http://pub.dartlang.org
68 library http; 68 library http;
69 69
70 import 'dart:async'; 70 import 'dart:async';
71 import 'dart:typed_data'; 71 import 'dart:typed_data';
72 import 'dart:uri';
73 72
74 import 'src/client.dart'; 73 import 'src/client.dart';
75 import 'src/response.dart'; 74 import 'src/response.dart';
76 75
77 export 'src/base_client.dart'; 76 export 'src/base_client.dart';
78 export 'src/base_request.dart'; 77 export 'src/base_request.dart';
79 export 'src/base_response.dart'; 78 export 'src/base_response.dart';
80 export 'src/byte_stream.dart'; 79 export 'src/byte_stream.dart';
81 export 'src/client.dart'; 80 export 'src/client.dart';
82 export 'src/multipart_file.dart'; 81 export 'src/multipart_file.dart';
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 /// For more fine-grained control over the request and response, use [Request] 178 /// For more fine-grained control over the request and response, use [Request]
180 /// instead. 179 /// instead.
181 Future<Uint8List> readBytes(url, {Map<String, String> headers}) => 180 Future<Uint8List> readBytes(url, {Map<String, String> headers}) =>
182 _withClient((client) => client.readBytes(url, headers: headers)); 181 _withClient((client) => client.readBytes(url, headers: headers));
183 182
184 Future _withClient(Future fn(Client)) { 183 Future _withClient(Future fn(Client)) {
185 var client = new Client(); 184 var client = new Client();
186 var future = fn(client); 185 var future = fn(client);
187 return future.whenComplete(client.close); 186 return future.whenComplete(client.close);
188 } 187 }
OLDNEW
« no previous file with comments | « pkg/analyzer_experimental/test/generated/test_support.dart ('k') | pkg/http/lib/src/base_client.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698