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

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

Issue 810223002: Remove the http package from the repo. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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
(Empty)
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
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.
4
5 library streamed_response;
6
7 import 'dart:async';
8
9 import 'byte_stream.dart';
10 import 'base_response.dart';
11 import 'base_request.dart';
12 import 'utils.dart';
13
14 /// An HTTP response where the response body is received asynchronously after
15 /// the headers have been received.
16 class StreamedResponse extends BaseResponse {
17 /// The stream from which the response body data can be read. This should
18 /// always be a single-subscription stream.
19 final ByteStream stream;
20
21 /// Creates a new streaming response. [stream] should be a single-subscription
22 /// stream.
23 StreamedResponse(
24 Stream<List<int>> stream,
25 int statusCode,
26 {int contentLength,
27 BaseRequest request,
28 Map<String, String> headers: const {},
29 bool isRedirect: false,
30 bool persistentConnection: true,
31 String reasonPhrase})
32 : super(
33 statusCode,
34 contentLength: contentLength,
35 request: request,
36 headers: headers,
37 isRedirect: isRedirect,
38 persistentConnection: persistentConnection,
39 reasonPhrase: reasonPhrase),
40 this.stream = toByteStream(stream);
41 }
OLDNEW
« no previous file with comments | « pkg/http/lib/src/streamed_request.dart ('k') | pkg/http/lib/src/utils.dart » ('j') | pkg/pkg.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698