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

Side by Side Diff: lib/http.dart

Issue 1580273002: Get rid of all the library tags. (Closed) Base URL: git@github.com:dart-lang/http@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « lib/browser_client.dart ('k') | lib/src/base_client.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 library http;
7
8 import 'dart:async'; 6 import 'dart:async';
9 import 'dart:convert'; 7 import 'dart:convert';
10 import 'dart:typed_data'; 8 import 'dart:typed_data';
11 9
12 import 'src/client.dart'; 10 import 'src/client.dart';
13 import 'src/response.dart'; 11 import 'src/response.dart';
14 12
15 export 'src/base_client.dart'; 13 export 'src/base_client.dart';
16 export 'src/base_request.dart'; 14 export 'src/base_request.dart';
17 export 'src/base_response.dart'; 15 export 'src/base_response.dart';
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 /// For more fine-grained control over the request and response, use [Request] 159 /// For more fine-grained control over the request and response, use [Request]
162 /// instead. 160 /// instead.
163 Future<Uint8List> readBytes(url, {Map<String, String> headers}) => 161 Future<Uint8List> readBytes(url, {Map<String, String> headers}) =>
164 _withClient((client) => client.readBytes(url, headers: headers)); 162 _withClient((client) => client.readBytes(url, headers: headers));
165 163
166 Future _withClient(Future fn(Client)) { 164 Future _withClient(Future fn(Client)) {
167 var client = new Client(); 165 var client = new Client();
168 var future = fn(client); 166 var future = fn(client);
169 return future.whenComplete(client.close); 167 return future.whenComplete(client.close);
170 } 168 }
OLDNEW
« no previous file with comments | « lib/browser_client.dart ('k') | lib/src/base_client.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698