Closed connor11528 closed 7 years ago
I am using vue.js and vue-resource so tried setting headers using that library to no avail
Vue.http.headers.common['Access-Control-Allow-Origin'] = '*'
Vue.http.headers.common['Access-Control-Allow-Headers'] = 'Content-Type,Authorization'
Vue.http.headers.common['Access-Control-Allow-Methods'] = 'GET'
It looks like we're using node-oauth to make the request. Not sure if we can set custom headers or what the deal is! https://github.com/ciaranj/node-oauth/issues/243
Okay I think it is because this code is running on the client side and in order for this package to work it must only be on server side
I feel like this the most common AJAX issue in the world but I am running in to a cross origin request issue. I am using chrome browser. Do i need to set a request header or pass parameters?
What can I do in my javascript code to enable the request to the yelp API?
Thank you!
Code setup:
Error text:
Error image: