usePreconfiguredSession
Set a session to be used to make HTTP requests. If the preconfigured session is set, configureSession and handleChallenge blocks will be ignored.
The session must be created with KtorNSURLSessionDelegate as a delegate.
val delegate = KtorNSURLSessionDelegate()
val session = NSURLSession.sessionWithConfiguration(
NSURLSessionConfiguration.defaultSessionConfiguration(),
delegate,
delegateQueue = null
)
usePreconfiguredSession(session, delegate)
Content copied to clipboard
See also
for details.
Deprecated (with error)
Please use method with delegate parameter
Set a session to be used to make HTTP requests, null to create default session. If the preconfigured session is set, configureSession block will be ignored.