0

I'm trying to fetch an RDF file from a URL using fetch() but I it doesn't seem to work through code. If I enter the URL directly in a web browser, it'll download the file.

Let's say this is the RDF file I want to download: http://www.regmurcia.com/eventos.rdf

Here is my code:

fetch("http://www.regmurcia.com/eventos.rdf", {'mode': 'no-cors'})
        .then(res => {
            return res.text()
        })
        .then(res =>{
            console.log(res)
        })
    }

This will log an empty string in the console. I tried using blob() and the result was empty too.

When I try to fetch other types of data (json, xml, etc..) it works.

Any idea why this isn't working ?

rollstuhlfahrer
  • 3,988
  • 9
  • 25
  • 38
Sequal
  • 1
  • 1

0 Answers0