the code looks like this, not sure how to read the response data. Any idea ?.
var url = 'http://www.bbc.co.uk/sport/football'; fetch(url, { mode : 'no-cors' }).then(function(response) { console.log(response); });
Response object
You can not.
If the source does not support CORS, you cannot directly receive response data. That the entire no-cors ... no-cors allows you to use the answer in a certain way, but not actually read / access data.
no-cors
Use one of the following options, depending on the expected data:
response.blob() response.text() response.formData() response.json() response.arrayBuffer()
Source: https://habr.com/ru/post/1012067/More articles:Java Does Google GSON use constructors? - javaAurelia "Hello World" application does not work at all - javascriptThe correct way to install a PEM certificate on Android - androidImplicit ExecutionContext priority in Scala 2.12 - scalaclang vs gcc in processing abstract classes at compile time - c ++SKEmitterNode, how to maintain the same effect in blend mode "add" to different backgrounds - iosPrivate Boolean: how to install on SKCropNode, with Swift? - privateError creating NSManaged Subclass in Xcode 8.2 beta - iosHow to access iOS private APIs in Swift? - iosWhat is a selector in SKAction: execute (_: onTarget :) - swiftAll Articles