Skip to content
This repository was archived by the owner on Feb 24, 2025. It is now read-only.

Prepare for upcoming change to HttpRequest and HttpClientResponse #254

Merged
merged 1 commit into from
Jun 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion tool/update_blns.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ Future<Null> main() async {
try {
var request = await client.getUrl(Uri.parse(_blnsJsonRawUrl));
var response = await request.close();
json = (jsonDecode(await response.transform(utf8.decoder).join('')) as List)
json = (jsonDecode(await response
.cast<List<int>>()
.transform(utf8.decoder)
.join('')) as List)
.cast<String>();
} finally {
client.close();
Expand Down
3 changes: 2 additions & 1 deletion tool/update_emojis.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ Future<Null> main() async {
var client = HttpClient();
var request = await client.getUrl(Uri.parse(_emojisJsonRawUrl));
var response = await request.close();
var json = jsonDecode(await response.transform(utf8.decoder).join(''))
var json = jsonDecode(
await response.cast<List<int>>().transform(utf8.decoder).join(''))
.map((alias, info) => MapEntry(alias, info.cast<String, dynamic>()))
.cast<String, Map<String, dynamic>>();
var emojisContent = StringBuffer('''
Expand Down