Did anyone tried configureSession() with ktor to s...
# ktor
s
Did anyone tried configureSession() with ktor to set delegate for certificate validation? ktor version 1.3
Copy code
Ios.create {
    configureSession {
    }
}
Delegate method for certificate validation
Copy code
func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Swift.Void)
e
Hi @Saood, we can make extension point for that in response handler.
s
@e5l Can you please share sample code.
s
great. so this will be included in new release 1.3.2 ?
e
Yep, just merged in
master
s
Great. Thanks
so there will be new block like configure session or configure request.
👍 1
i can see challengeHandler block
t
This great @e5l, thanks for adding it! Just wondering if it maybe is better to implement this method instead: https://developer.apple.com/documentation/foundation/nsurlsessiontaskdelegate/1411595-urlsession This one also has the task parameter. The method that you implemented in the commit without the task parameter is (as far as I know) not always called. (https://developer.apple.com/documentation/foundation/nsurlsessiondelegate/1409308-urlsession)
đź‘€ 1
See the “Discussion” under the second link
s
@e5l When Ktor 1.3.2 will be release? with challenge handler.
e
We don’t have an exact date for now, but we’re preparing for the end of this week.
s
ok thanks @e5l
👍 1
a
Thanks for adding this. Super helpful.
e
Thanks, I’ll take a look
btw PR’s are always welcome 🙂