showing results for - "how to set the request 27s mode to 27no cors 27 javascript"
Roland
14 Feb 2019
1const url = 'https://www. yammer.com/api/v1/messages/following.json';
2
3const options = {
4  method: 'GET',
5  mode: 'no-cors',
6  headers: {
7    'Authorization': `Bearer ${process.env.REACT_APP_YAMMER_ACCESS_TOKEN}`,
8  }
9};
10
11fetch(url, options).then(function(response) {
12  console.log(response);
13  return response.json();
14}).then(function(json) {
15  console.log(json);
16});