Type Method

canInit(with:)

Determines whether the protocol subclass can handle the specified request.

Declaration

class func canInit(with request: URLRequest) -> Bool

Parameters

request

The request to be handled.

Return Value

true if the protocol subclass can handle request, otherwise false.

Discussion

A subclass should inspect request and determine whether or not the implementation can perform a load with that request.

This is an abstract method and subclasses must provide an implementation.

See Also

Determining If a Subclass Can Handle a Request

class func canInit(with: URLSessionTask) -> Bool

Determines whether the protocol subclass can handle the specified task.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software