Can anyone help me fetch data from https://dexonline.ro/definitie/skate?format=json. I tried fetch/ajax like this, but i'm getting this error:
With postman it works... Also i'm bad at English so just write the code, thanks in advance
Can anyone help me fetch data from https://dexonline.ro/definitie/skate?format=json. I tried fetch/ajax like this, but i'm getting this error:
With postman it works... Also i'm bad at English so just write the code, thanks in advance
 
    
     
    
    Hi i guess you solve your problem, so i gave you the way on how to get this restriction out. Create a simple file PHP and copy/paste, i do file_get_contents you take the json and then you parse to a var javascript and you are done, regards ;).
 <?php
   $json = file_get_contents("https://dexonline.ro/definitie/skate?format=json");
?>
<!DOCTYPE html>
<html>
<head>
    <title>test</title>
</head>
<body>
<script>
    var json = <?php echo $json; ?>;
    document.body.onload = function(){
        document.write(json.word);//return Skate
    };
</script>
</body>
</html>
Regards.