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

Unified Diff: pkg/http/lib/src/streamed_request.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 side-by-side diff with in-line comments
Download patch
Index: pkg/http/lib/src/streamed_request.dart
diff --git a/pkg/http/lib/src/streamed_request.dart b/pkg/http/lib/src/streamed_request.dart
deleted file mode 100644
index 9a62ddb222495f238bd52fc85bebb706a6eddeb9..0000000000000000000000000000000000000000
--- a/pkg/http/lib/src/streamed_request.dart
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// 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 streamed_request;
-
-import 'dart:async';
-
-import 'byte_stream.dart';
-import 'base_request.dart';
-
-/// An HTTP request where the request body is sent asynchronously after the
-/// connection has been established and the headers have been sent.
-///
-/// When the request is sent via [BaseClient.send], only the headers and
-/// whatever data has already been written to [StreamedRequest.stream] will be
-/// sent immediately. More data will be sent as soon as it's written to
-/// [StreamedRequest.sink], and when the sink is closed the request will end.
-class StreamedRequest extends BaseRequest {
- /// The sink to which to write data that will be sent as the request body.
- /// This may be safely written to before the request is sent; the data will be
- /// buffered.
- ///
- /// Closing this signals the end of the request.
- EventSink<List<int>> get sink => _controller.sink;
-
- /// The controller for [sink], from which [BaseRequest] will read data for
- /// [finalize].
- final StreamController<List<int>> _controller;
-
- /// Creates a new streaming request.
- StreamedRequest(String method, Uri url)
- : super(method, url),
- _controller = new StreamController<List<int>>(sync: true);
-
- /// Freezes all mutable fields other than [stream] and returns a
- /// single-subscription [ByteStream] that emits the data being written to
- /// [sink].
- ByteStream finalize() {
- super.finalize();
- return new ByteStream(_controller.stream);
- }
-}

Powered by Google App Engine
This is Rietveld 408576698