http - FLUTTER How to implement Digest Authentification
问题描述
to implement a normal HTTP Request is very easy. But to implement a Digest Authentification I do not really know how to implement.
In the best case you can discribe it for Flutter but I do not mind if it is in another language.
Thank You!
解决方案
DartHttpClient
支持摘要。如果您事先知道领域,请addCredentials
在提出请求之前致电。如果没有,请实现authenticate
回调,它将把方案和领域传回给你。然后,您应该addCredentials
从回调的实现中调用。
您仍然可以通过将其package:http
与, 一起使用:HttpClient
HttpClient authenticatingClient = HttpClient();
authenticatingClient.addCredentials(url, realm, credentials);
http.Client client = http.IOClient(authenticatingClient);
推荐阅读
- c# - 尝试使用 SSL 时出现 ActiveMQ 异常
- javascript - 如何将 PostgreSQL 时间戳与 moment.js 进行比较并仅指定日期?
- bash - sed – 转义变量中的单引号
- r - 有没有办法从表函数中获得不同的计数
- python - 下次如何用立即替换 NaT
- ruby-on-rails - Rails each_slice 在页面底部显示数组
- reactjs - 如何根据函数调用重新渲染反应组件?
- url-rewriting - IIS URL 重写:formaction 自定义标记属性被忽略
- django - 我想使用当前 url 在当前页面上创建一个指向现有表单的 url 链接
- c# - 编辑清单文件 GDI 设置导致“应用程序无法启动”