axios.get('https://myapi.com/data') .then((response) => { console.log(response.data); }) .catch((error) => { console.log(error); });
axios.get('https://myapi.com/data') .then((response) => { console.log(response); }) .catch((error) => { console.log(error); });
axios.get('https://myapi.com/data', { headers: { 'Access-Control-Allow-Origin': '*' } }) .then((response) => { console.log(response); }) .catch((error) => { console.log(error); });