Personally I need to consume a third-party API with Javascript, I do not have access to release the CORs in the API .. and this error is appearing as I can solve? I have the following request using the axios: obs: When I make the request in postman it works.
axios({
method: 'POST',
url: url,
data: {},
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'Accept': 'application/json'
}
}).then(res => {
console.log(res);
}).catch(err => {
console.log(err);
})
Thank you!