You might want to pass in options to axios like this
axios.get( <URL>, { headers: { 'Access-Control-Allow-Origin': '*' } } );
If not could you please post your error message?
I have updated the post. There seems to be a ETIMEDOUT error. But, I know the Github API is working fine.
I am working behind a proxy. Is that an issue ?
Have you tried using axios-proxy-fix? It is a npm package.
axios-proxy-fix
No, I will try that.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You might want to pass in options to axios like this
If not could you please post your error message?
I have updated the post. There seems to be a ETIMEDOUT error. But, I know the Github API is working fine.
I am working behind a proxy. Is that an issue ?
Have you tried using
axios-proxy-fix
? It is a npm package.No, I will try that.