(in promise) TypeError: NetworkError when attempting to fetch resource

24 views Asked by At

When i run my app on FireFox, the console returns me an error : (in promise) TypeError: NetworkError when attempting to fetch resource.

I understand what's that mean but i have no clue how to fix it. Besides everythings run well on the others browsers...( chrome, Edge ..) anyone has an idea?

here my code :

export function fetchManager(url, data) {

    // Objet littéral des paramètres
    const options= {
        mode: 'no-cors',
        method:'POST',
        header: {
                'Content-Type': 'application/json'},
        body: JSON.stringify(data)
    }
    // Appel et récupère le retour de fetch
    let reponseData = fetch(url, options)
    
    return reponseData;
}

And here the return of the Firefox's console :

Uncaught (in promise) TypeError: NetworkError when attempting to fetch resource.

Thank you all.

I try to check firefox's setting but without success..

0

There are 0 answers