Merge pull request #5 from tvolkert/http
Prepare for upcoming change to HttpRequest and HttpClientResponse
This commit is contained in:
commit
aacd91e267
1 changed files with 1 additions and 1 deletions
|
@ -79,7 +79,7 @@ main() {
|
||||||
var client = new HttpClient();
|
var client = new HttpClient();
|
||||||
var rq = await client.openUrl('GET', Uri.parse('$url/hijack'));
|
var rq = await client.openUrl('GET', Uri.parse('$url/hijack'));
|
||||||
var rs = await rq.close();
|
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');
|
print('Response: $body');
|
||||||
expect(json.decode(body), {'error': 'crime'});
|
expect(json.decode(body), {'error': 'crime'});
|
||||||
} on HttpException catch (e, st) {
|
} on HttpException catch (e, st) {
|
||||||
|
|
Loading…
Reference in a new issue