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

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

Issue 14426006: Rename dart:typeddata to dart:typed_data. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 /// Future<StreamedResponse> send(BaseRequest request) { 61 /// Future<StreamedResponse> send(BaseRequest request) {
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:typeddata'; 71 import 'dart:typed_data';
72 import 'dart:uri'; 72 import 'dart:uri';
73 73
74 import 'src/client.dart'; 74 import 'src/client.dart';
75 import 'src/response.dart'; 75 import 'src/response.dart';
76 76
77 export 'src/base_client.dart'; 77 export 'src/base_client.dart';
78 export 'src/base_request.dart'; 78 export 'src/base_request.dart';
79 export 'src/base_response.dart'; 79 export 'src/base_response.dart';
80 export 'src/byte_stream.dart'; 80 export 'src/byte_stream.dart';
81 export 'src/client.dart'; 81 export 'src/client.dart';
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 /// For more fine-grained control over the request and response, use [Request] 179 /// For more fine-grained control over the request and response, use [Request]
180 /// instead. 180 /// instead.
181 Future<Uint8List> readBytes(url, {Map<String, String> headers}) => 181 Future<Uint8List> readBytes(url, {Map<String, String> headers}) =>
182 _withClient((client) => client.readBytes(url, headers: headers)); 182 _withClient((client) => client.readBytes(url, headers: headers));
183 183
184 Future _withClient(Future fn(Client)) { 184 Future _withClient(Future fn(Client)) {
185 var client = new Client(); 185 var client = new Client();
186 var future = fn(client); 186 var future = fn(client);
187 return future.whenComplete(client.close); 187 return future.whenComplete(client.close);
188 } 188 }
OLDNEW
« no previous file with comments | « compiler/java/com/google/dart/compiler/parser/DartParser.java ('k') | pkg/http/lib/src/base_client.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698