1
我正在使用UIImageView.af_setImage扩展从需要认证的webdav服务器下载图像。AlamofireImage addAuthentication not added授权标头
在此基础上说的文档......
如果图像需要从UIImageView的扩展认证证书,它可以提供如下:
ImageDownloader.default.addAuthentication(user: "user", password: "password")
...我曾尝试添加身份验证2种不同的方式:
ImageDownloader.default.addAuthentication(user: "user", password: "password")
and when没有工作
UIImageView.af_sharedImageDownloader.addAuthentication(user: "user", password: "password")
但是,似乎都没有发送授权头到HTTP请求。
我错过了什么?