-
Hello, I'm trying to learn about using APIs and using this as a project to learn, I have used other APIs and worked fine, but I'm not able to make this one work due an error related to:
I have used the mode 'no-cors' but I'm still not able to see the data, I'm confused because when I use the Postman app I'm able to get data but not from my local server from Visual Studio Hope someone can guide me. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
What do you mean with "local server"? I'm not a JavaScript expert, but from what I've figured:
One possible solution to this would be to set up a proxy server, which proxies your requests to the API and takes care of the CORS headers. However, I'm curious if there are better solutions to this problem. |
Beta Was this translation helpful? Give feedback.
What do you mean with "local server"?
I have the same problem when trying to access the endpoints directly with client side JavaScript code.
Accessing the endpoints from Python with the
requests
library is no problem however.I'm not a JavaScript expert, but from what I've figured:
One possible solution to this would be to set up a proxy server, which proxies your requests to the API and takes care of the CORS headers.
However, I'm curious if there are better solutions to t…