Provides loading of a URL request. More...
#import <CPURLConnection.h>
Class Methods | |
(CPURLConnection) | + connectionWithRequest:delegate: |
(CPData) | + sendSynchronousRequest:returningResponse: |
(CPData) | + sendSynchronousRequest:returningResponse:error: |
(void) | + setClassDelegate: |
![]() | |
(BOOL) | + accessInstanceVariablesDirectly |
(id) | + alloc |
(id) | + allocWithCoder: |
(BOOL) | + automaticallyNotifiesObserversForKey: |
(void) | + cancelPreviousPerformRequestsWithTarget: |
(void) | + cancelPreviousPerformRequestsWithTarget:selector:object: |
(Class) | + class |
(BOOL) | + conformsToProtocol: |
(void) | + exposeBinding: |
(void) | + initialize |
(IMP) | + instanceMethodForSelector: |
(BOOL) | + instancesRespondToSelector: |
(BOOL) | + isBindingExclusive: |
(BOOL) | + isSubclassOfClass: |
(CPSet) | + keyPathsForValuesAffectingValueForKey: |
(void) | + load |
(id) | + new |
(void) | + object:performSelector:withObject:afterDelay:inModes: |
(void) | + setVersion: |
(Class) | + superclass |
(int) | + version |
Provides loading of a URL request.
An interface to downloading content at a specified URL. Using one of the class methods, you can obtain the data. @delegate -(void)connection:(CPURLConnection)connection didFailWithError:(id)error; Called when the connection encounters an error.
connection | the connection that had an error |
error | the error, which is either a javascript DOMException or an http status code (javascript number/CPNumber) |
-(void)connection:(CPURLConnection)connection didReceiveResponse:(CPHTTPURLResponse)response; Called when the connection receives a response.
connection | the connection that received a response |
response | the received response @delegate -(void)connection:(CPURLConnection)connection didReceiveData:(CPString)data; Called when the connection has received data. |
connection | the connection that received data |
data | the received data @delegate -(void)connectionDidFinishLoading:(CPURLConnection)connection; Called when the URL has finished loading. |
connection | the connection that finished loading Class Delegate Method: @delegate -(void)connectionDidReceiveAuthenticationChallenge:(id)connection The class delegate allows you to set global behavior for when authentication challenges (401 status codes) are returned. The recommended way to handle this method is to store a reference to the connection, and then use whatever method you have to authenticate yourself. Once you've authenticated yourself, you should cancel and then start the connection: |
[connection cancel]; [connection start];
connection | the connection that received the authentication challenge. |
Definition at line 2 of file CPURLConnection.h.
|
implementation |
Definition at line 217 of file CPURLConnection.j.
|
implementation |
Definition at line 130 of file CPURLConnection.j.
|
implementation |
Synthesized accessor method.
Provided by category CPURLConnection(CPSynthesizedAccessors).
Definition at line 313 of file CPURLConnection.j.
|
implementation |
Definition at line 180 of file CPURLConnection.j.
|
implementation |
Definition at line 172 of file CPURLConnection.j.
|
implementation |
Definition at line 142 of file CPURLConnection.j.
|
implementation |
Definition at line 231 of file CPURLConnection.j.
|
implementation |
Synthesized accessor method.
Provided by category CPURLConnection(CPSynthesizedAccessors).
Definition at line 305 of file CPURLConnection.j.
|
implementation |
Definition at line 94 of file CPURLConnection.j.
|
implementation |
Provided by category CPURLConnection(Deprecated).
Definition at line 284 of file CPURLConnection.j.
|
implementation |
Definition at line 82 of file CPURLConnection.j.
|
implementation |
Definition at line 188 of file CPURLConnection.j.