Up
Authors
- Generated by Debian
-
- Declared in:
- Foundation/NSURLConnection.h
Availability: MacOS-X 10.2.0, Base 1.13.0
Description forthcoming.
Instance Variables
Method summary
+ (BOOL)
canHandleRequest: (
NSURLRequest*)request;
Availability: MacOS-X 10.2.0, Base 1.13.0
Performs a preliminary check to see if a load of
the specified request can be handled by an
instance of this class.
The results of this
method may be invalidated by subsequent changes to
the request or changes to the registered
protocols etc.
- (void)
cancel;
Availability: MacOS-X 10.2.0, Base 1.13.0
Cancel the asynchronous load in progress (if any)
for this connection.
- (id)
initWithRequest: (
NSURLRequest*)request
delegate: (id)delegate;
Availability: MacOS-X 10.2.0, Base 1.13.0
This is a designated initialiser for the class.
Initialises the receiver with the specified
request (performing a deep copy so that
the request does not change during loading)
and delegate.
This automatically
initiates an asynchronous load for the
request.
Processing of the
request is done in the thread which calls
this method, so the thread must run its current run
loop (in NSDefaultRunLoopMode) for processing to
continue/complete.
The
delegate will receive callbacks informing
it of the progress of the load.
This method
breaks with convention and retains the
delegate object, releasing it when the
connection finished loading, fails, or is
cancelled.
Instance Variables for NSURLConnection Class
@protected void* _NSURLConnectionInternal;
Availability: MacOS-X 10.2.0, Base 1.13.0
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.
- Declared in:
- Foundation/NSURLConnection.h
Availability: MacOS-X 10.7.0, Base 1.13.0
Description forthcoming.
Method summary
- (void)
connection: (
NSURLConnection*)connection
didFailWithError: (
NSError*)error;
Availability: MacOS-X 10.2.0, Base 1.13.0
Description forthcoming.
- (void)
connection: (
NSURLConnection*)connection
didReceiveData: (
NSData*)data;
Availability: MacOS-X 10.2.0, Base 1.13.0
Called when content data arrives during a
load operations... this may be incremental or may be
the compolete data for the load.
- (void)
connection: (
NSURLConnection*)connection
didReceiveResponse: (
NSURLResponse*)response;
Availability: MacOS-X 10.2.0, Base 1.13.0
Called when enough information to build a
NSURLResponse object has been received.
- (
NSCachedURLResponse*)
connection: (
NSURLConnection*)connection
willCacheResponse: (
NSCachedURLResponse*)cachedResponse;
Availability: MacOS-X 10.2.0, Base 1.13.0
Called with the cachedResponse to be
stored in the cache. The delegate can inspect the
cachedResponse and return a modified copy
if if wants changed to what whill be stored.
If
it returns nil
, nothing will be stored in
the cache.
- (
NSURLRequest*)
connection: (
NSURLConnection*)connection
willSendRequest: (
NSURLRequest*)request
redirectResponse: (
NSURLResponse*)response;
Availability: MacOS-X 10.2.0, Base 1.13.0
Informs the delegate that the
connection
must change the URL of the
request in order
to continue with the load operation.
This allows
the delegate to ionspect and/or modify a copy of the
request before the
connection
continues loading it. Normally the delegate can
return the
request unmodifield.
The redirection can be rejectected by the delegate
calling
-cancel
or returning
nil
.
Cancelling the
load will simply stop it, but returning
nil
will cause it to complete with a
redirection failure.
As a special case,
this method may be called with a
nil
response, indicating a change of URL made
internally by the system rather than due to a
response from the server.
- (void)
connectionDidFinishLoading: (
NSURLConnection*)connection;
Availability: MacOS-X 10.2.0, Base 1.13.0
Called when an NSURLConnection has finished loading
successfully.
- Declared in:
- Foundation/NSURLConnection.h
Availability: MacOS-X 10.2.0, Base 1.13.0
An interface to perform synchronous loading of URL
requests.
Method summary
+ (
NSData*)
sendSynchronousRequest: (
NSURLRequest*)request
returningResponse: (
NSURLResponse**)response
error: (
NSError**)error;
Availability: MacOS-X 10.2.0, Base 1.13.0
Performs a synchronous load of
request
and returns the
NSURLResponse
in
response.
Returns the result of
the load or
nil
if the load failed.
- Declared in:
- Foundation/NSURLConnection.h
- Conforms to:
- NSObject
Availability: MacOS-X 10.7.0, Base 1.13.0
Description forthcoming.
Up