dio icon indicating copy to clipboard operation
dio copied to clipboard

用原生请求好使,用dios请求就会被登录拦截

Open ZJGoal opened this issue 3 years ago • 1 comments

image 这个请求是好使的 但是我用dios就报错 image 是什么问题呢?

ZJGoal avatar Jun 20 '22 10:06 ZJGoal

好像都是和跨域,设置cookie相关的问题,到现在也没有人解决。有人尝试这样设置。

dio = Dio(options);
    BrowserHttpClientAdapter adapter = BrowserHttpClientAdapter();
    adapter.withCredentials = true;
    dio.httpClientAdapter = adapter;

但我没成功

ZhZhZhen avatar Jul 08 '22 03:07 ZhZhZhen