DarwinClientEngineConfig

A configuration for the Darwin client engine.

Report a problem

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

Handles the challenge of HTTP responses NSURLSession.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var preconfiguredSession: NSURLSession?

Specifies a session to use for making HTTP requests.

Link copied to clipboard
Link copied to clipboard
var requestConfig: NSMutableURLRequest.() -> Unit

A request configuration.

Link copied to clipboard
var sessionConfig: NSURLSessionConfiguration.() -> Unit

A session configuration.

Link copied to clipboard

Functions

Link copied to clipboard
fun configureRequest(block: NSMutableURLRequest.() -> Unit)

Appends a block with the NSMutableURLRequest configuration to requestConfig.

Link copied to clipboard
fun configureSession(block: NSURLSessionConfiguration.() -> Unit)

Appends a block with the NSURLSessionConfiguration configuration to sessionConfig.

Link copied to clipboard

Sets the block as an HTTP request challenge handler replacing the old one.

Link copied to clipboard
fun usePreconfiguredSession(session: NSURLSession?)

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.

fun usePreconfiguredSession(session: NSURLSession, delegate: KtorNSURLSessionDelegate)

Set a session to be used to make HTTP requests. If the preconfigured session is set, configureSession and handleChallenge blocks will be ignored.