Protocol

URLProtocolClient

The NSURLProtocolClient protocol provides the interface used by NSURLProtocol subclasses to communicate with the URL loading system. An application should never have the need to implement this protocol.

Symbols

Protocol Methods

func urlProtocol(URLProtocol, cachedResponseIsValid: CachedURLResponse)
Required.

Sent to indicate to the URL loading system that a cached response is valid.

func urlProtocol(URLProtocol, didCancel: URLAuthenticationChallenge)
Required.

Sent to indicate to the URL loading system that an authentication challenge has been canceled.

func urlProtocol(URLProtocol, didFailWithError: Error)
Required.

Sent when the load request fails due to an error.

func urlProtocol(URLProtocol, didLoad: Data)
Required.

An NSURLProtocol subclass instance, protocol, sends this message to [protocol client] as it loads data.

func urlProtocol(URLProtocol, didReceive: URLAuthenticationChallenge)
Required.

Sent to indicate to the URL loading system that an authentication challenge has been received.

func urlProtocol(URLProtocol, didReceive: URLResponse, cacheStoragePolicy: URLCache.StoragePolicy)
Required.

Sent to indicate to the URL loading system that the protocol implementation has created a response object for the request.

func urlProtocol(URLProtocol, wasRedirectedTo: URLRequest, redirectResponse: URLResponse)
Required.

Sent to indicate to the URL loading system that the protocol implementation has been redirected.

func urlProtocolDidFinishLoading(URLProtocol)
Required.

Sent to indicate to the URL loading system that the protocol implementation has finished loading.

Relationships

Inherits From