it showing error while trying to post data using json api ,on postman json service is returing data but in JavaScript showing error .
function signIn()
{
try{
console.log("signIN");
const email = document.getElementById("email").value;
const password = document.getElementById("password").value;
const url = (
'http://localhost:8080/chheila.com/login.jsp?' +
new URLSearchParams({ email:email,password:password}).toString()
);
const result = fetch(url ,{mode:"no-cors"})
.then(response => response.json());
console.log('Fetched from: ' + url);
console.log(result);
}
catch(error){
document.getElementById("error").innerHTML = error.message
}
}