I\'m trying to use fetch
api.
First i create a new Headers()
object:
var oHeaders = new Headers({
\'Accept\': \'applic
When you set mode: 'no-cors'
for a request, browsers won’t allow you to set any request headers other than CORS-safelisted request-headers. See the spec requirements:
To append a name/value (name/value) pair to a
Headers
object (headers), run these steps:
- Otherwise, if guard is "
request-no-cors
" and name/value is not a CORS-safelisted request-header, return.
In that algorithm, return
equates to “return without adding that header to the Headers object”.