Skip to content

Instantly share code, notes, and snippets.

@zero-master
Created April 7, 2014 06:15
Show Gist options
  • Save zero-master/10015543 to your computer and use it in GitHub Desktop.
Save zero-master/10015543 to your computer and use it in GitHub Desktop.
}).then((HttpResponse resp) {
var json = '';
if (resp.statusCode == 200) {
resp.transform(UTF8.decoder) // use a UTF8.decoder
.listen((String data) => json = json + data, // output the data
onError: (error) => print("UNABLE TO CONNECT"), onDone:() {
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment