var request = HttpRequest
.get(serverUrl)
.then(function(res) {
console.log("11111111111");
jsonData = res.body || jsonData // keep JSON result
console.log(JSON.stringify(jsonData));
})
.catch(function(err) {
console.log("FFFFFFFFF");
console.log(err.message)
console.log(err.response)
});
console.log("RRRRRRRRRRRRR");
var xhr = new XMLHttpRequest
xhr.onreadystatechange = function() {
if (xhr.readyState === XMLHttpRequest.DONE) {
var dataString = xhr.responseText
console.log("888888888");
console.log(dataString);
console.log(JSON.stringify(xhr.getAllResponseHeaders()));
console.log("888888888");
//jsonData = JSON.parse(dataString)
}
}
console.log("EEEEEEEEEEEEE");
xhr.open("GET", serverUrl)
xhr.send()
With httpRequest I get
Error creating SSL context ()
On PC, Windows 10. On Android Mobile the program does not work thus, I assume it’s exhibiting the same problems.
With XMLHttpRequest I am just getting an empty response, no headers and no body. I tried https://jsonplaceholder.typicode.com/posts and even a simple .json hosted on a webserver https://tonberry.news/json/News.json
Both are mostly copy pastes of the original code posted on the documentation so I don’t know why I am struggling so hard to get this engine to cooperate with me.
Thus to no avail. I have literally EVERY thing the Maintenance Tool has to offer installed