Protocol

NSURLProtocolClient

The interface used by NSURLProtocol subclasses to communicate with the URL Loading System.

Declaration

@protocol NSURLProtocolClient

Overview

Don’t implement this protocol in your application. Instead, your NSURLProtocol subclass calls methods of this protocol on its own client property.

Topics

Creating a Response

- URLProtocol:didReceiveResponse:cacheStoragePolicy:

Tells the client that the protocol implementation has created a response object for the request.

Required.

Handling Redirects

- URLProtocol:wasRedirectedToRequest:redirectResponse:

Tells the client that the protocol implementation has been redirected.

Required.

Working with Cache Data

- URLProtocol:cachedResponseIsValid:

Tells the client that a cached response is valid.

Required.

Handling Authentication Challenges

- URLProtocol:didCancelAuthenticationChallenge:

Tells the client that an authentication challenge has been canceled.

Required.

- URLProtocol:didReceiveAuthenticationChallenge:

Tells the client that the URL Loading System received an authentication challenge.

Required.

Indicating Loading Progress or Failure

- URLProtocol:didFailWithError:

Tells the client that the load request failed due to an error.

Required.

- URLProtocol:didLoadData:

Tells the client that the protocol implementation has loaded some data.

Required.

- URLProtocolDidFinishLoading:

Tells the client that the protocol implementation has finished loading.

Required.

Relationships

Inherits From

See Also

Getting Protocol Attributes

cachedResponse

The protocol’s cached response.

client

The object the protocol uses to communicate with the URL loading system.

request

The protocol’s request.

task

The protocol’s task.