Last active
August 29, 2015 14:18
-
-
Save kasperpeulen/42cddc9a1a9abd71eae6 to your computer and use it in GitHub Desktop.
Url Exists
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:html'; | |
main(){ | |
urlExists('https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement/autofocus'); | |
urlExists("https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement"); | |
} | |
urlExists(String url) async { | |
try { | |
await HttpRequest.getString(url); | |
print(true); | |
} catch(error) { | |
print(false); | |
} // examine response for errors | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p{ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment