SDWebImage and setting custom HTTP headers?

前端 未结 5 751
余生分开走
余生分开走 2020-12-14 18:00

I´ve just changed my code for caching images away from EGOImageCache to SDWebView. Unfortunately i don´t know how to set custom HTTP headers as i have to send authentificati

5条回答
  •  北海茫月
    2020-12-14 18:40

    I am using Basic authentication and setting the username and password on the sharedDownloader helped:

    SDWebImageDownloader *downloader = [SDWebImageDownloader sharedDownloader];
    downloader.username = @"username";
    downloader.password = @"password";
    

提交回复
热议问题