File tree Expand file tree Collapse file tree 10 files changed +21
-6
lines changed Expand file tree Collapse file tree 10 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ linter:
30
30
- await_only_futures
31
31
- camel_case_types
32
32
- cascade_invocations
33
- # comment_references
33
+ - comment_references
34
34
- constant_identifier_names
35
35
- control_flow_in_finally
36
36
- curly_braces_in_flow_control_structures
Original file line number Diff line number Diff line change @@ -7,7 +7,10 @@ import 'dart:convert';
7
7
import 'dart:typed_data' ;
8
8
9
9
import 'src/client.dart' ;
10
+ import 'src/exception.dart' ;
11
+ import 'src/request.dart' ;
10
12
import 'src/response.dart' ;
13
+ import 'src/streamed_request.dart' ;
11
14
12
15
export 'src/base_client.dart' ;
13
16
export 'src/base_request.dart' ;
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import 'dart:convert';
6
6
import 'dart:typed_data' ;
7
7
8
8
import 'base_request.dart' ;
9
+ import 'byte_stream.dart' ;
9
10
import 'client.dart' ;
10
11
import 'exception.dart' ;
11
12
import 'request.dart' ;
Original file line number Diff line number Diff line change @@ -6,6 +6,9 @@ import 'dart:collection';
6
6
7
7
import 'package:meta/meta.dart' ;
8
8
9
+ import '../http.dart' show get;
10
+ import 'base_client.dart' ;
11
+ import 'base_response.dart' ;
9
12
import 'byte_stream.dart' ;
10
13
import 'client.dart' ;
11
14
import 'streamed_response.dart' ;
@@ -67,7 +70,7 @@ abstract class BaseRequest {
67
70
/// The maximum number of redirects to follow when [followRedirects] is true.
68
71
///
69
72
/// If this number is exceeded the [BaseResponse] future will signal a
70
- /// [ RedirectException] . Defaults to 5.
73
+ /// ` RedirectException` . Defaults to 5.
71
74
int get maxRedirects => _maxRedirects;
72
75
int _maxRedirects = 5 ;
73
76
Original file line number Diff line number Diff line change 2
2
// for details. All rights reserved. Use of this source code is governed by a
3
3
// BSD-style license that can be found in the LICENSE file.
4
4
5
+ import 'base_client.dart' ;
5
6
import 'base_request.dart' ;
6
7
7
8
/// The base class for HTTP responses.
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import 'base_request.dart';
10
10
import 'client_stub.dart'
11
11
if (dart.library.html) 'browser_client.dart'
12
12
if (dart.library.io) 'io_client.dart' ;
13
+ import 'exception.dart' ;
13
14
import 'response.dart' ;
14
15
import 'streamed_response.dart' ;
15
16
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import 'base_request.dart';
7
7
import 'byte_stream.dart' ;
8
8
import 'request.dart' ;
9
9
import 'response.dart' ;
10
+ import 'streamed_request.dart' ;
10
11
import 'streamed_response.dart' ;
11
12
12
13
// TODO(nweiz): once Dart has some sort of Rack- or WSGI-like standard for
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import 'package:http_parser/http_parser.dart';
8
8
9
9
import 'byte_stream.dart' ;
10
10
import 'multipart_file_stub.dart' if (dart.library.io) 'multipart_file_io.dart' ;
11
+ import 'multipart_request.dart' ;
11
12
import 'utils.dart' ;
12
13
13
14
/// A file to be uploaded as part of a [MultipartRequest] .
Original file line number Diff line number Diff line change 4
4
5
5
import 'dart:async' ;
6
6
7
+ import 'base_client.dart' ;
7
8
import 'base_request.dart' ;
8
9
import 'byte_stream.dart' ;
9
10
10
11
/// An HTTP request where the request body is sent asynchronously after the
11
12
/// connection has been established and the headers have been sent.
12
13
///
13
14
/// When the request is sent via [BaseClient.send] , only the headers and
14
- /// whatever data has already been written to [StreamedRequest.stream ] will be
15
+ /// whatever data has already been written to [StreamedRequest.sink ] will be
15
16
/// sent immediately. More data will be sent as soon as it's written to
16
17
/// [StreamedRequest.sink] , and when the sink is closed the request will end.
17
18
class StreamedRequest extends BaseRequest {
@@ -32,9 +33,8 @@ class StreamedRequest extends BaseRequest {
32
33
: _controller = StreamController <List <int >>(sync : true ),
33
34
super (method, url);
34
35
35
- /// Freezes all mutable fields other than [stream] and returns a
36
- /// single-subscription [ByteStream] that emits the data being written to
37
- /// [sink] .
36
+ /// Freezes all mutable fields and returns a single-subscription [ByteStream]
37
+ /// that emits the data being written to [sink] .
38
38
@override
39
39
ByteStream finalize () {
40
40
super .finalize ();
Original file line number Diff line number Diff line change 22
22
/// 200,
23
23
/// headers: {'content-type': 'application/json'});
24
24
/// });
25
+ library http.testing;
26
+
27
+ import 'src/mock_client.dart' ;
28
+
25
29
export 'src/mock_client.dart' ;
You can’t perform that action at this time.
0 commit comments