I have a APIs in Laravel in localhost and with ionic runing android device with USB
but a get this error http://127.0.0.1:8000/api/v1/login net::ERR_CONNECTION_REFUSED
How can I access my Api in my localhost with ionic run android -l ?
I have a APIs in Laravel in localhost and with ionic runing android device with USB
but a get this error http://127.0.0.1:8000/api/v1/login net::ERR_CONNECTION_REFUSED
How can I access my Api in my localhost with ionic run android -l ?
localhost
(and 127.0.0.1
) are the host that the HTTP request is being made from. So if you’re running on an android device, that means it’s expecting the HTTP server to be on that device.
I would recommend always using proper DNS hostnames for everything. It makes all these problems go away.
do you have someone link about it ?