Skip to content

Instantly share code, notes, and snippets.

@zoechi
Last active August 29, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zoechi/a5170ff293b861b3db6b to your computer and use it in GitHub Desktop.
Save zoechi/a5170ff293b861b3db6b to your computer and use it in GitHub Desktop.
// SO 29428637
import 'dart:html' as dom;
const url = 'https://gist.githubusercontent.com/zoechi/a5170ff293b861b3db6b/raw/cf1332926cf9feb9d7463750a66df75571e6ab89/main.dart';
main() async {
try {
final response = await dom.HttpRequest.getString(url);
print(response);
} catch(e) {
print(e.runtimeType);
print(e.message);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment