Issue
I am using Flutter, VSCode and Android emulator in Windows 10. Also Deno as the backend server. I am trying to connect Flutter app to Deno app locally in my PC. But I don't know what address exactly I must use?
This is the address I am trying to send get, post, etc.
requests from the Flutter app to:
http://10.0.2.2:8000/api/register
And this is the address I am trying to receive those requests inside my deno app:
Listening on: http://0.0.0.0:8000
And the endpoints such as /api/register
work when I use postman to test them with the follwong address for example:
0.0.0.0:8000/api/register
I don't know what is the problem and how can I fix it?
Solution
It seems that when I use Android Emulator and want to point out to the http://localhost
I must use the following address:
http://10.0.2.2
This means localhost
in the Android Emulator.
Answered By - GoodMan
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.