You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.
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?
OPTIONS https://api.yelp.com/v2/search?term=food&location=Montreal 404 ()
localhost/:1 Fetch API cannot load https://api.yelp.com/v2/search?term=food&location=Montreal.
Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin'
header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access.
The response had HTTP status code 404. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Error image:
The text was updated successfully, but these errors were encountered:
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:
The text was updated successfully, but these errors were encountered: