Skip to content

Instantly share code, notes, and snippets.

@kypflug
Created June 12, 2015 21:46
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 kypflug/2541de4a9ec2e6f45a14 to your computer and use it in GitHub Desktop.
Save kypflug/2541de4a9ec2e6f45a14 to your computer and use it in GitHub Desktop.
JsProjectWinRTNamespace(L"Windows.Foundation");
JsProjectWinRTNamespace(L"Windows.Web");
// Get content from an Uri.
JsRunScript(
L"var uri = new Windows.Foundation.Uri(\"http://somedatasource.com\"); " \
L"var httpClient = new Windows.Web.Http.HttpClient();" \
L"httpClient.getStringAsync(uri).done(function () { " \
L" // do something with the string content " \
L"}, onError); " \
L"function onError(reason) { " \
L" // error handling " \
L"}", JS_SOURCE_CONTEXT_NONE, L"", &result);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment