Type Method

canHandleRequest:

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

Declaration

+ (BOOL)canHandleRequest:(NSURLRequest *)request;

Parameters

request

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

Return Value

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

Discussion

The result of this method is valid as long as no NSURLProtocol 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