Merge pull request #5 from tvolkert/http

Prepare for upcoming change to HttpRequest and HttpClientResponse
This commit is contained in:
Tobe Osakwe 2019-07-08 20:17:26 -04:00 committed by GitHub
commit aacd91e267
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -79,7 +79,7 @@ main() {
var client = new HttpClient();
var rq = await client.openUrl('GET', Uri.parse('$url/hijack'));
var rs = await rq.close();
var body = await rs.transform(utf8.decoder).join();
var body = await rs.cast<List<int>>().transform(utf8.decoder).join();
print('Response: $body');
expect(json.decode(body), {'error': 'crime'});
} on HttpException catch (e, st) {