network localhost refused
RoxDevvv opened this issue · comments
i tested my API using postman it work fine however when i call it from nylo it fail
Future<String?> GetTest() async {
return await network<String>(
request: (request) => request.get("/test"),
);
}
I/flutter (16330): ╔╣ Request ║ GET
I/flutter (16330): ║ http://localhost:3000/test
I/flutter (16330): ╚══════════════════════════════════════════════════════════════════════════════════════════╝
D/EGL_emulation(16330): app_time_stats: avg=96.64ms min=2.39ms max=501.03ms count=12
I/flutter (16330):
I/flutter (16330): ╔╣ DioError ║ DioExceptionType.connectionError
I/flutter (16330): ║ The connection errored: Connection refused
I/flutter (16330): ╚══════════════════════════════════════════════════════════════════════════════════════════╝
I/flutter (16330): [2023-10-18 23:54:37] error DioException [connection error]: The connection errored: Connection refused
I/flutter (16330): Error: SocketException: Connection refused (OS Error: Connection refused, errno = 111), address = localhost, port = 47028
after testing it looks like the problem is only when using localhost URL not sure why nylo network can't handle localhost url