I am building an app in vue.js and using axios for my http requests. I am trying to make a request to a 3rd party API but I keep getting
Response for preflight has invalid HTTP status code 403
. However, the exact same request works if I use postman. My request:
axios({
method: "get",
url: "www.xxx.com/api/v1/xxx",
headers: {
'Access-Control-Allow-Origin': '*',
'Content-Type': 'application/json; charset=utf-8',
authorization: authToken,
accept: 'application/json'
}
}).then(res => {
// do something
}).catch(err => {
// handle error
})
Note - I am using google chrome and have the CORS extension activated.
Can someone help
Thanks in advance!