Skip to content

Commit b868df1

Browse files
committed
api [nfc]: Unpack http.Response.fromStream
1 parent eb5b5fe commit b868df1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/api/core.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class ApiConnection {
5656
if (response.statusCode != 200) {
5757
throw Exception("error on ${request.method} ${request.url.path}: status ${response.statusCode}");
5858
}
59-
return utf8.decode((await http.Response.fromStream(response)).bodyBytes);
59+
return utf8.decode(await response.stream.toBytes());
6060
}
6161

6262
void close() {

0 commit comments

Comments
 (0)