Fix per breaking change to HttpRequest and HttpClientResponse (#216)

* Fix per breaking change to HttpRequest and HttpClientResponse

A recent change to the Dart SDK updated `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

* Fix versions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ab2d943..db252ae 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,10 @@
+## v2.1.1
+
+* Forward-compatible fix for upcoming Dart SDK breaking change
+  (`HttpClientResponse` implementing `Stream<Uint8List>`)
+
 ## v2.1.0
+
 * Full support of JsonWire and W3C protocol specs in sync and async WebDriver.
 
 ## v2.0.0
diff --git a/lib/src/request/async_io_request_client.dart b/lib/src/request/async_io_request_client.dart
index 9d0c380..8e0cc08 100644
--- a/lib/src/request/async_io_request_client.dart
+++ b/lib/src/request/async_io_request_client.dart
@@ -49,7 +49,7 @@
       final response = await httpRequest.close();
 
       return WebDriverResponse(response.statusCode, response.reasonPhrase,
-          await utf8.decodeStream(response));
+          await utf8.decodeStream(response.cast<List<int>>()));
     } finally {
       _lock.release();
     }
diff --git a/lib/support/forwarder.dart b/lib/support/forwarder.dart
index 58c23ef..dc44938 100644
--- a/lib/support/forwarder.dart
+++ b/lib/support/forwarder.dart
@@ -90,7 +90,7 @@
       }
       Map<dynamic, dynamic> params;
       if (request.method == 'POST') {
-        String requestBody = await utf8.decodeStream(request);
+        String requestBody = await utf8.decodeStream(request.cast<List<int>>());
         if (requestBody != null && requestBody.isNotEmpty) {
           params = json.decode(requestBody) as Map<dynamic, dynamic>;
         }
diff --git a/pubspec.yaml b/pubspec.yaml
index 952ae7f..8fed1b8 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,5 +1,5 @@
 name: webdriver
-version: 2.1.0
+version: 2.1.1
 authors:
   - Marc Fisher II <fisherii@google.com>
   - Matt Staats<staats@google.com>