DEV Community

Discussion on: [Need Help] Getting data using Axios does not work for some URLs

Collapse
 
manan30 profile image
Manan Joshi

You might want to pass in options to axios like this

axios.get( <URL>,  { headers: { 'Access-Control-Allow-Origin':  '*'  } } );
Enter fullscreen mode Exit fullscreen mode

If not could you please post your error message?

Collapse
 
memahesh profile image
Medam Mahesh

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 ?

Collapse
 
manan30 profile image
Manan Joshi

Have you tried using axios-proxy-fix? It is a npm package.

Thread Thread
 
memahesh profile image
Medam Mahesh

No, I will try that.