Skip to content

Commit

Permalink
update dart code
Browse files Browse the repository at this point in the history
  • Loading branch information
IoTServ committed Apr 26, 2019
1 parent ec5ab35 commit 94b8d6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions networking.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ class _MyHomePageState extends State<MyHomePage> {
var request = await httpClient.getUrl(Uri.parse(url));
var response = await request.close();
if (response.statusCode == HttpStatus.OK) {
var json = await response.transform(UTF8.decoder).join();
var data = JSON.decode(json);
var json = await response.transform(utf8.decoder).join();
var data = jsonDecode(json);
result = data['origin'];
} else {
result =
Expand Down

0 comments on commit 94b8d6e

Please sign in to comment.