{"action":"created","issue":{"url":"https://api.github.com/repos/onevcat/Kingfisher/issues/14","labels_url":"https://api.github.com/repos/onevcat/Kingfisher/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/onevcat/Kingfisher/issues/14/comments","events_url":"https://api.github.com/repos/onevcat/Kingfisher/issues/14/events","html_url":"https://github.com/onevcat/Kingfisher/issues/14","id":69467121,"number":14,"title":"Bug: Download from https ","user":{"login":"szuniverse","id":7426176,"avatar_url":"https://avatars.githubusercontent.com/u/7426176?v=3","gravatar_id":"","url":"https://api.github.com/users/szuniverse","html_url":"https://github.com/szuniverse","followers_url":"https://api.github.com/users/szuniverse/followers","following_url":"https://api.github.com/users/szuniverse/following{/other_user}","gists_url":"https://api.github.com/users/szuniverse/gists{/gist_id}","starred_url":"https://api.github.com/users/szuniverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szuniverse/subscriptions","organizations_url":"https://api.github.com/users/szuniverse/orgs","repos_url":"https://api.github.com/users/szuniverse/repos","events_url":"https://api.github.com/users/szuniverse/events{/privacy}","received_events_url":"https://api.github.com/users/szuniverse/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/onevcat/Kingfisher/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":{"login":"onevcat","id":1019875,"avatar_url":"https://avatars.githubusercontent.com/u/1019875?v=3","gravatar_id":"","url":"https://api.github.com/users/onevcat","html_url":"https://github.com/onevcat","followers_url":"https://api.github.com/users/onevcat/followers","following_url":"https://api.github.com/users/onevcat/following{/other_user}","gists_url":"https://api.github.com/users/onevcat/gists{/gist_id}","starred_url":"https://api.github.com/users/onevcat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onevcat/subscriptions","organizations_url":"https://api.github.com/users/onevcat/orgs","repos_url":"https://api.github.com/users/onevcat/repos","events_url":"https://api.github.com/users/onevcat/events{/privacy}","received_events_url":"https://api.github.com/users/onevcat/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2015-04-19T21:34:39Z","updated_at":"2015-04-21T05:36:09Z","closed_at":null,"body":"Hi \r\n\r\nI try to download an image:\r\nhttps://i.scdn.co/image/15b2aeb2ffbe7e279b438d47f6a21d5768f3da9d\r\nThis is an image url from spotify api request.\r\n\r\nI get this error:\r\nNSURLConnection/CFURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9813\r\n\r\nI know the solution if you use NSURLConnection:\r\n\r\n   func connection(connection: NSURLConnection, canAuthenticateAgainstProtectionSpace protectionSpace: NSURLProtectionSpace) -> Bool {\r\n        return protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust\r\n    }\r\n    \r\n\r\n    func connection(connection: NSURLConnection, didReceiveAuthenticationChallenge challenge: NSURLAuthenticationChallenge) {\r\n        if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust {\r\n            let credentials = NSURLCredential(forTrust: challenge.protectionSpace.serverTrust)\r\n            challenge.sender.useCredential(credentials, forAuthenticationChallenge: challenge)\r\n        }\r\n        challenge.sender.continueWithoutCredentialForAuthenticationChallenge(challenge)\r\n    }"},"comment":{"url":"https://api.github.com/repos/onevcat/Kingfisher/issues/comments/94643991","html_url":"https://github.com/onevcat/Kingfisher/issues/14#issuecomment-94643991","issue_url":"https://api.github.com/repos/onevcat/Kingfisher/issues/14","id":94643991,"user":{"login":"onevcat","id":1019875,"avatar_url":"https://avatars.githubusercontent.com/u/1019875?v=3","gravatar_id":"","url":"https://api.github.com/users/onevcat","html_url":"https://github.com/onevcat","followers_url":"https://api.github.com/users/onevcat/followers","following_url":"https://api.github.com/users/onevcat/following{/other_user}","gists_url":"https://api.github.com/users/onevcat/gists{/gist_id}","starred_url":"https://api.github.com/users/onevcat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onevcat/subscriptions","organizations_url":"https://api.github.com/users/onevcat/orgs","repos_url":"https://api.github.com/users/onevcat/repos","events_url":"https://api.github.com/users/onevcat/events{/privacy}","received_events_url":"https://api.github.com/users/onevcat/received_events","type":"User","site_admin":false},"created_at":"2015-04-21T05:36:08Z","updated_at":"2015-04-21T05:36:08Z","body":"Merged. You can now use `trustedHosts` of `ImageDownloader` to skip the self-signed host.\r\n\r\n```\r\nKingfisherManager.sharedManager.downloader.trustedHosts = Set([\"i.scdn.co\"])\r\n```\r\n\r\nfor example.\r\n\r\nBut it is not recommended unless you know what this means. It would be better to get a certification from a CA.\r\n\r\n@szuniverse And I believe you have no need to use this for i.scdn.co, there should be something else wrong with your environment."}}