Skip to content
This repository was archived by the owner on Jun 13, 2024. It is now read-only.
This repository was archived by the owner on Jun 13, 2024. It is now read-only.

JsProjectWinrtNamespace sample not working in UWP Library #89

@priya301191

Description

@priya301191

I am working on UWP library(which will be used by UWP application) , where i am trying to make HTTP Request from JavaScript using "Windows.Web" namespace.
Below is the sample i am trying to run:
var uri = new Windows.Foundation.Uri("http://google.com");
var httpClient = new Windows.Web.Http.HttpClient();

httpClient.getStringAsync(uri).done(function () {
// do something with the string content "
Debug.writeln("finished");
}, onError);
function onError(reason) {
// error handling
Debug.writeln( "onError");
}

But this script is not working properly. After making Async call, I am not able to do anything with the response.
Do I need to do something else to make this async call work, such as using "JsSetProjectionEnqueueCallback" ?
But as per the documentation, for UWP apps, its not required to setup "JsSetProjectionEnqueueCallback".

Can someone please help with the sample code as well in C#?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions