Skip to content

Commit bf96551

Browse files
authored
Call out more limitations of runWithClient (#1248)
Towards #828 Add a section in the `runWithClient` doc that mentions HTTP requests which _aren't_ affected by usage of this API - specifically requests made through the SDK core libraries, or through instantiating specific client implementations.
1 parent eb189e1 commit bf96551

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkgs/http/lib/src/client.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,10 @@ Client? get zoneClient {
198198
/// and the convenience HTTP functions (e.g. [http.get]). If [clientFactory]
199199
/// returns `Client()` then the default [Client] is used.
200200
///
201+
/// Only fresh `Client` instances using the default constructor are impacted.
202+
/// HTTP requests made using `dart:io` or `dart:html` APIs,
203+
/// or using specifically instantiated client implementations, are not affected.
204+
///
201205
/// When used in the context of Flutter, [runWithClient] should be called before
202206
/// [`WidgetsFlutterBinding.ensureInitialized`](https://api.flutter.dev/flutter/widgets/WidgetsFlutterBinding/ensureInitialized.html)
203207
/// because Flutter runs in whatever [Zone] was current at the time that the

0 commit comments

Comments
 (0)