How to solve for: net::ERR_CONNECTION_REFUSED when GET data to React?
I'm trying to get this API call to work using axios: const getData = () => { Axios.get("http://localhost:3000/security?select=symbol,company", {headers: {Authorization: 'Bearer 73Ntx3b6SwNXC7ANV3tw4wFfDdKntB26', "Access-Control-Allow-Origin": "*", mode: "cors", }} ).then((response) => { console.log(response) }) } My local API server is up and running, I can make requests using curl and see JSON data. However, the calls do not work when I implement a GET request in my React App. I'm a little curious to know why I'm getting these errors: Failed to load resource: net::ERR_CONNECTION_REFUSED creat
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.