dongzhucha3999 2018-08-31 06:22
浏览 108

Flutter - HTTP响应窗口身份验证

I'm new in flutter.

I created an application that parse .JSON format from .php body using http.get()/http.post().

everything is working normally when using the local database and local Apache server on my laptop.

the problem stared when I applied this project using windows server(domain) as database server and apache server, my flutter apps does't working anymore.

When I tried to access the .php file (checkConnection.php) using my browser on my laptop/android phone it is showing a popup that asking an windows authentication.

Windows Auth Screenshoot

checkConnection.php was working when i input my domain account.

THE QUESTION.

Does anyone know an alternative way to solve this issue? maybe something like saving my credentials on the code?

This is the code that I used on my flutter application:

final response =
    await http.post("http://172.28.16.84/mobileglpi/login.php", body: {

  'username': txt_username.text,
  'password': txt_password.text,
});
var datauser = json.decode(response.body);
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 stata安慰剂检验作图但是真实值不出现在图上
    • ¥15 c程序不知道为什么得不到结果
    • ¥40 复杂的限制性的商函数处理
    • ¥15 程序不包含适用于入口点的静态Main方法
    • ¥15 素材场景中光线烘焙后灯光失效
    • ¥15 请教一下各位,为什么我这个没有实现模拟点击
    • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
    • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
    • ¥20 有关区间dp的问题求解
    • ¥15 多电路系统共用电源的串扰问题