Type Method


Returns whether a request can be handled based on a preflight evaluation.


class func canHandle(_ request: URLRequest) -> Bool



The request to evaluate. The connection deep-copies the request on creation.

Return Value

true if a preflight operation determines that a connection with request can be created and the associated I/O can be started, false otherwise.


The result of this method is valid as long as no URLProtocol classes are registered or unregistered, and request remains unchanged. Applications should be prepared to handle failures even if they have performed request preflighting by calling this method.

See Also