We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e89b190 commit f93c76fCopy full SHA for f93c76f
CHANGELOG.md
@@ -1,5 +1,7 @@
1
## 0.13.4-dev
2
3
+* Throw a more useful error when a client is used after it has been closed.
4
+
5
## 0.13.3
6
7
* Validate that the `method` parameter of BaseRequest is a valid "token".
lib/src/io_client.dart
@@ -24,6 +24,11 @@ class IOClient extends BaseClient {
24
/// Sends an HTTP request and asynchronously returns the response.
25
@override
26
Future<IOStreamedResponse> send(BaseRequest request) async {
27
+ if (_inner == null) {
28
+ throw ClientException(
29
+ 'HTTP request failed. Client is already closed.', request.url);
30
+ }
31
32
var stream = request.finalize();
33
34
try {
0 commit comments