Skip to content

Commit 1617b72

Browse files
authored
fix doc comments (#497)
1 parent ecee9a6 commit 1617b72

10 files changed

+21
-6
lines changed

analysis_options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ linter:
3030
- await_only_futures
3131
- camel_case_types
3232
- cascade_invocations
33-
# comment_references
33+
- comment_references
3434
- constant_identifier_names
3535
- control_flow_in_finally
3636
- curly_braces_in_flow_control_structures

lib/http.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ import 'dart:convert';
77
import 'dart:typed_data';
88

99
import 'src/client.dart';
10+
import 'src/exception.dart';
11+
import 'src/request.dart';
1012
import 'src/response.dart';
13+
import 'src/streamed_request.dart';
1114

1215
export 'src/base_client.dart';
1316
export 'src/base_request.dart';

lib/src/base_client.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import 'dart:convert';
66
import 'dart:typed_data';
77

88
import 'base_request.dart';
9+
import 'byte_stream.dart';
910
import 'client.dart';
1011
import 'exception.dart';
1112
import 'request.dart';

lib/src/base_request.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ import 'dart:collection';
66

77
import 'package:meta/meta.dart';
88

9+
import '../http.dart' show get;
10+
import 'base_client.dart';
11+
import 'base_response.dart';
912
import 'byte_stream.dart';
1013
import 'client.dart';
1114
import 'streamed_response.dart';
@@ -67,7 +70,7 @@ abstract class BaseRequest {
6770
/// The maximum number of redirects to follow when [followRedirects] is true.
6871
///
6972
/// If this number is exceeded the [BaseResponse] future will signal a
70-
/// [RedirectException]. Defaults to 5.
73+
/// `RedirectException`. Defaults to 5.
7174
int get maxRedirects => _maxRedirects;
7275
int _maxRedirects = 5;
7376

lib/src/base_response.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
import 'base_client.dart';
56
import 'base_request.dart';
67

78
/// The base class for HTTP responses.

lib/src/client.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import 'base_request.dart';
1010
import 'client_stub.dart'
1111
if (dart.library.html) 'browser_client.dart'
1212
if (dart.library.io) 'io_client.dart';
13+
import 'exception.dart';
1314
import 'response.dart';
1415
import 'streamed_response.dart';
1516

lib/src/mock_client.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import 'base_request.dart';
77
import 'byte_stream.dart';
88
import 'request.dart';
99
import 'response.dart';
10+
import 'streamed_request.dart';
1011
import 'streamed_response.dart';
1112

1213
// TODO(nweiz): once Dart has some sort of Rack- or WSGI-like standard for

lib/src/multipart_file.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import 'package:http_parser/http_parser.dart';
88

99
import 'byte_stream.dart';
1010
import 'multipart_file_stub.dart' if (dart.library.io) 'multipart_file_io.dart';
11+
import 'multipart_request.dart';
1112
import 'utils.dart';
1213

1314
/// A file to be uploaded as part of a [MultipartRequest].

lib/src/streamed_request.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44

55
import 'dart:async';
66

7+
import 'base_client.dart';
78
import 'base_request.dart';
89
import 'byte_stream.dart';
910

1011
/// An HTTP request where the request body is sent asynchronously after the
1112
/// connection has been established and the headers have been sent.
1213
///
1314
/// 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
1516
/// sent immediately. More data will be sent as soon as it's written to
1617
/// [StreamedRequest.sink], and when the sink is closed the request will end.
1718
class StreamedRequest extends BaseRequest {
@@ -32,9 +33,8 @@ class StreamedRequest extends BaseRequest {
3233
: _controller = StreamController<List<int>>(sync: true),
3334
super(method, url);
3435

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].
3838
@override
3939
ByteStream finalize() {
4040
super.finalize();

lib/testing.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,8 @@
2222
/// 200,
2323
/// headers: {'content-type': 'application/json'});
2424
/// });
25+
library http.testing;
26+
27+
import 'src/mock_client.dart';
28+
2529
export 'src/mock_client.dart';

0 commit comments

Comments
 (0)