Is it possible to resolve the error In 'Access-Control-Allow-Origin' on the front end?

0

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!

    
asked by anonymous 25.07.2018 / 01:02

0 answers