如何解决颤振:DioError [DioErrorType.response]:XMLHttpRequest 错误
我创建了一个应用程序并在模拟器和安卓手机上对其进行了测试,我使用的是基于 api 和 nodejs 的后端和 mongodb 数据库。当我在设备上测试它时它工作正常,但是当我在 chrome 上运行它时它向我发送这个错误。
错误:
Error: Unsupported operation: NetworkInterface.list
dioError [dioErrorType.response]: XMLHttpRequest error.
代码:
calltimeInApi() async {
dio dio=new dio();
var data={
'username': getname,'token': getaccesstoken,};
timeOutButtonpressed=true;
await dio
.post(localhostUrlTimeIn,data: json.encode(data))
.then((onResponse)async {
getapitimein=onResponse.data['TimeIn'];
}).catchError((onerror){
print(onerror.toString());
});
}
请帮助我做错的地方!
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。