DEV Community

Divyesh05
Divyesh05

Posted on

In Expo 40.0 how can I make Https request using axios.

any body who know how can I fetch my data with https from server using axios. because I implement it in that I got network error exception..
how can I resolve it??

Discussion (4)

Collapse
amanhimself profile image
Aman Mittal
Collapse
divyesh05 profile image
Divyesh05 Author

Thanks for help..
In that Ican't get actual idea how it's works what I need to do. if you can give more description which make me very understandable.

Collapse
amanhimself profile image
Aman Mittal

The main reason could be for the problem you are facing is CORS. If, from the server side/API, the CORS is not enabled then you won't be able to fetch the data from the API. Is that the problem you are facing?

You can use the developer console to debug and check out the error in chrome console for the expo app. Here is more information you can find out on how to use Debugger in Expo apps: docs.expo.io/workflow/debugging/

Let me know if you are able to resolve it or not.

Thread Thread
divyesh05 profile image
Divyesh05 Author

Thanks yes, you're right it's related CORS..
Thank you once again..