Subclasses of NSURLProtocol implement basic
handling of URL loading for specific protocols.
The NSURLProtocol class itsself is a semi-abstract
class giving the essential structure for the
subclasses.
You never instantiate NSURLProtocol yourself... it
should only ever be done by other classes within the
URL loading system.
Allows subclasses to provide access to proptocol
specific properties, returning the property of
request stored by the name key
or nil if no property had been stored using
that key in the request.
Registers the specified class so that it can be
used to load requests. When the system is
determining which class to use to handle a
request it examines them in a most recently
registered first order. The
+canInitWithRequest:
method is used to determine whether a class may be
used to handle a particular request or not. Returns
YES if registered (ie the class is an
NSURLProtocol subclass), NO
otherwise.
Initialises the receiver with
request, cachedResponse and
client. The
cachedResponse may be the result of a
previous load of the request (in which
case the protocol may validate and use it). The
client is the object which receives
messages about the progress of the load. This is
retained by the protocl instance and is released
once the last message has been sent to it.
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
Returns the 'canonical' version of the
request. The canonical form is used
to look up requests in the cache by checking for
equality. The abnstract class
implementation simply returns
request.