Answer the question
In order to leave comments, you need to log in
Why does the request to the server not work only in firefox?
fetch (whatwg-fetch polyfill) request works in all browsers (even IE) but fails in Firefox:
const headers = new Headers()
headers.append('Content-Type', 'application/json')
headers.append('user', '*****')
const request = new Request('**********', {
headers: headers
})
return window.fetch(request)
.then(response => response.json())
.then(result => {
console.log(result)
})
.catch(e => {
console.log('ошибка')
console.log(e)
})
TypeError: NetworkError when attempting to fetch resource.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question