You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But custom delegate methods are just not called for simple GET/POST queries. Don't think this how it should be. It looks like DataLoader.swift just lacks them.
Particularly in my case (I need to do some SSl pinning) if I add the following code to DataLoader.swift everything begins to work as expected:
It looks like delegation is forwarded only for some subtypes of URLSessionDelegate (URLSessionTaskDelegate, URLSessionDataDelegate, URLSessionDownloadDelegate) but not for the type itself. Just not sure if it will be correct to implement such forwarding for both URLSessionDelegate and it subtypes. That's why made it an issue, not a pull request.
The text was updated successfully, but these errors were encountered:
I might be wrong because it's been a while, but I think the situation with authentication challenges is that there is a per-session and a per-task delegate method, which are mutually exclusive. I would suggest implementing a per-task one, which is part of the DataLoader implementation:
It is handy we can set our own custom URLSessionDelegate in APIClient init.
But custom delegate methods are just not called for simple GET/POST queries. Don't think this how it should be. It looks like DataLoader.swift just lacks them.
Particularly in my case (I need to do some SSl pinning) if I add the following code to
DataLoader.swift
everything begins to work as expected:It looks like delegation is forwarded only for some subtypes of
URLSessionDelegate
(URLSessionTaskDelegate
,URLSessionDataDelegate
,URLSessionDownloadDelegate
) but not for the type itself. Just not sure if it will be correct to implement such forwarding for bothURLSessionDelegate
and it subtypes. That's why made it an issue, not a pull request.The text was updated successfully, but these errors were encountered: