【发布时间】:2021-09-26 04:06:45
【问题描述】:
尝试从我的 Flutter 手机调用 api(用 c# (GRPC) 编写):
Future<void> login(email, password) async {
final stub = AuthenticationClient(ClientChannel('https://abc.service.domain.com'));
var request = LoginRequest()..email=email
..password=password;
var response = await stub.login(request);
print(response);
}
GrpcError (gRPC Error (code: 14, codeName: UNAVAILABLE, message: Error connected: SocketException: Failed host lookup: 'https://abc.service.domain.com' (OS Error: No address associated with hostname, errno = 7),详细信息:null,rawResponse:null))。
已经设置/检查设备的互联网权限,并且已经有互联网。 检查服务是否正在运行,并且已在另一个应用程序中使用。
有什么想法吗?,
TIA。
【问题讨论】:
标签: flutter api dart grpc http2