When making a program that gets data from the server in json format, the program works in MS Windows (and on my Mac) but not on Chrome and Safari on IPad
(Putting one tab chrome on Ipad to the URL: chrome://inspect you get access to a very simple debug tool for getting output from errors and console.log() calls accross all tabs from chrome. )
My code:
async function fetchData(){
console.log('started') //this is the only comment
// shown in chrome://inspect pannel
const response = await fetch(checkRep, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
parameter1: 'param1',
parameter2: 'param2',
})
})
const json= await response.json();
console.log(json) //appears on chrome windows and on mac
//but it does not appear on chrome://inspect on IPad
doSomething(json);
}
function doSomething(json){
console.log(json+'<br>this comment does not appear on chrome://inspect')
}