File tree Expand file tree Collapse file tree 7 files changed +15
-16
lines changed
shelf_router_generator/lib/src
shelf_test_handler/lib/src Expand file tree Collapse file tree 7 files changed +15
-16
lines changed Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ to capture only errors that would otherwise be top-leveled:
124124``` dart
125125/// Run [callback] and capture any errors that would otherwise be top-leveled.
126126///
127- /// If [ this] is called in a non-root error zone, it will just run [callback]
127+ /// If ` this` is called in a non-root error zone, it will just run [callback]
128128/// and return the result. Otherwise, it will capture any errors using
129129/// [runZoned] and pass them to [onError].
130130void catchTopLevelErrors(
Original file line number Diff line number Diff line change @@ -7,18 +7,17 @@ import 'package:http_parser/http_parser.dart';
77
88import '../middleware.dart' ;
99
10- /// Middleware that adds [chunked transfer coding][] to responses if none of the
11- /// following conditions are true:
12- ///
13- /// [chunked transfer coding] : https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6.1
10+ /// Middleware that adds
11+ /// [chunked transfer coding] (https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6.1)
12+ /// to a responses if none of the following conditions are true:
1413///
1514/// * A Content-Length header is provided.
1615/// * The Content-Type header indicates the MIME type `multipart/byteranges` .
1716/// * The Transfer-Encoding header already includes the `chunked` coding.
1817///
19- /// This is intended for use by [Shelf adapters][] rather than end-users.
20- ///
21- /// [Shelf adapters] : https://github.com/dart-lang/shelf#adapters
18+ /// This is intended for use by
19+ /// [Shelf adapters] (https://pub.dev/packages/shelf#adapters) rather than
20+ /// end-users.
2221final addChunkedEncoding = createMiddleware (responseHandler: (response) {
2322 if (response.contentLength != null ) return response;
2423 if (response.statusCode < 200 ) return response;
Original file line number Diff line number Diff line change @@ -294,9 +294,9 @@ class _OnHijack {
294294
295295 _OnHijack (this ._callback);
296296
297- /// Calls [ this] .
297+ /// Calls ` this` .
298298 ///
299- /// Throws a [StateError] if [ this] has already been called.
299+ /// Throws a [StateError] if ` this` has already been called.
300300 void run (void Function (StreamChannel <List <int >>) callback) {
301301 if (called) throw StateError ('This request has already been hijacked.' );
302302 called = true ;
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import 'shelf_unmodifiable_map.dart';
1010
1111/// Run [callback] and capture any errors that would otherwise be top-leveled.
1212///
13- /// If [ this] is called in a non-root error zone, it will just run [callback]
13+ /// If ` this` is called in a non-root error zone, it will just run [callback]
1414/// and return the result. Otherwise, it will capture any errors using
1515/// [runZoned] and pass them to [onError] .
1616void catchTopLevelErrors (void Function () callback,
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ const _responseType = g.TypeChecker.fromRuntime(shelf.Response);
3434const _requestType = g.TypeChecker .fromRuntime (shelf.Request );
3535const _stringType = g.TypeChecker .fromRuntime (String );
3636
37- /// A representation of a handler that was annotated with [Route] .
37+ /// A representation of a handler that was annotated with [shelf_router. Route] .
3838class _Handler {
3939 final String verb, route;
4040 final ExecutableElement element;
Original file line number Diff line number Diff line change @@ -6,10 +6,10 @@ import 'package:shelf/shelf.dart';
66
77/// A single expectation for an HTTP request sent to a [ShelfTestHandler] .
88class Expectation {
9- /// The expected request method, or [ null] if this allows any requests.
9+ /// The expected request method, or ` null` if this allows any requests.
1010 final String ? method;
1111
12- /// The expected request path, or [ null] if this allows any requests.
12+ /// The expected request path, or ` null` if this allows any requests.
1313 final String ? path;
1414
1515 /// The handler to use for requests that match this expectation.
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ class ShelfTestHandler {
3939 _zone = Zone .current;
4040
4141 /// Expects that a single HTTP request with the given [method] and [path] will
42- /// be made to [ this] .
42+ /// be made to ` this` .
4343 ///
4444 /// The [path] should be root-relative; that is, it shuld start with "/".
4545 ///
@@ -51,7 +51,7 @@ class ShelfTestHandler {
5151 _expectations.add (Expectation (method, path, handler));
5252 }
5353
54- /// Expects that a single HTTP request will be made to [ this] .
54+ /// Expects that a single HTTP request will be made to ` this` .
5555 ///
5656 /// When a request is made, [handler] is used to handle that request.
5757 ///
You can’t perform that action at this time.
0 commit comments