Languages

Menu
Sites
Language
XMLHttpRequest

Hello guys,

We are making samsung smart tv app in tizen os and we can not make ajax calls.

Responses

3 Replies
Marco Buettner
Hi, thanks for sharing so much information about your problem.
Iqbal Hossain

You may try like this and add required privilege.

// js
var client = new XMLHttpRequest();
client.open("GET", "https://cors-test.appspot.com/test");
client.onreadystatechange = function() {
    if (client.readyState == 4) {
        if(client.status == 200) {
           console.log(client.responseText);
        }
    }
};
client.send();

// config.xml:
<access origin="*" subdomains="true"></access>
<tizen:privilege name="http://tizen.org/privilege/internet"/>

 

Lilit Mkrtchyan

Thanks :)