We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cd748b6 commit db7f165Copy full SHA for db7f165
pkgs/http/lib/src/io_client.dart
@@ -72,6 +72,18 @@ class IOClient extends BaseClient {
72
/// The underlying `dart:io` HTTP client.
73
HttpClient? _inner;
74
75
+ /// Create a new `dart:io`-based HTTP [Client].
76
+ ///
77
+ /// If [inner] is provided then it can be used to provide configuration
78
+ /// options for the client.
79
80
+ /// For example:
81
+ /// ```dart
82
+ /// final httpClient = HttpClient()
83
+ /// ..userAgent = 'Book Agent'
84
+ /// ..idleTimeout = const Duration(seconds: 5);
85
+ /// final client = IOClient(httpClient);
86
+ /// ```
87
IOClient([HttpClient? inner]) : _inner = inner ?? HttpClient();
88
89
/// Sends an HTTP request and asynchronously returns the response.
0 commit comments