This file contains 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
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