美文网首页
Flutter - 使用网络请求

Flutter - 使用网络请求

作者: yytester | 来源:发表于2019-10-04 18:52 被阅读0次
    import 'package:dio/dio.dart';
    void getHttp() async {
      try {
        Response response = await Dio().get("https://www.baidu.com");
        print(response);
    
        print("-------------");
        print(response.data.toString());
      } catch (e) {
        print(e);
      }
    }
    
    void main(List<String> args) {
       getHttp();
    }
    
    
    

    相关文章

      网友评论

          本文标题:Flutter - 使用网络请求

          本文链接:https://www.haomeiwen.com/subject/gtyspctx.html