Skip to content

Commit da1d523

Browse files
tvolkertkevmoo
authored andcommitted
Prepare for upcoming change to HttpRequest and HttpClientResponse (#146)
An upcoming change to the Dart SDK will change `HttpRequest` and `HttpClientResponse` from implementing `Stream<List<int>>` to implementing `Stream<Uint8List>`. This forwards-compatible change prepares for that SDK breaking change by casting the Stream to `List<int>` before transforming it. dart-lang/sdk#36900
1 parent 554e7a4 commit da1d523

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/src/server/hooks.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class HookMiddleware {
2525
return;
2626
}
2727

28-
request.transform(const Utf8Decoder()).join().then((content) {
28+
const Utf8Decoder().bind(request).join().then((content) {
2929
_eventController.add(HookEvent.fromJSON(
3030
request.headers.value("X-GitHub-Event"),
3131
jsonDecode(content) as Map<String, dynamic>));

0 commit comments

Comments
 (0)