CPURLConnection Class Reference
[Foundation]

Provides loading of a URL request. More...

List of all members.

Public Member Functions

(void) - cancel [implementation]
(id) - delegate [implementation]
(id) - initWithRequest:delegate: [implementation]
(id) - initWithRequest:delegate:startImmediately: [implementation]
(BOOL) - isLocalFileConnection [implementation]
(void) - start [implementation]

Static Public Member Functions

(CPURLConnection+ connectionWithRequest:delegate: [implementation]
(CPData+ sendSynchronousRequest:returningResponse: [implementation]
(CPData+ sendSynchronousRequest:returningResponse:error: [implementation]
(void) + setClassDelegate: [implementation]

Detailed Description

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.

-(void)connection:(CPURLConnection)connection didFailWithError:(id)error; Called when the connection encounters an error.

Parameters:
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.

Parameters:
connection the connection that received a response
response the received response

-(void)connection:(CPURLConnection)connection didReceiveData:(CPString)data; Called when the connection has received data.

Parameters:
connection the connection that received data
data the received data

-(void)connectionDidFinishLoading:(CPURLConnection)connection; Called when the URL has finished loading.

Parameters:
connection the connection that finished loading

Class Delegate Method:

-(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];
Parameters:
connection the connection that received the authentication challenge.

Definition at line 75 of file CPURLConnection.j.


Member Function Documentation

- (void) cancel   [implementation]

Definition at line 214 of file CPURLConnection.j.

+ (CPURLConnection) connectionWithRequest: (CPURLRequest aRequest
delegate: (id)  aDelegate 
[implementation]

Definition at line 129 of file CPURLConnection.j.

- (id) delegate   [implementation]

Definition at line 177 of file CPURLConnection.j.

- (id) initWithRequest: (CPURLRequest aRequest
delegate: (id)  aDelegate 
[implementation]

Definition at line 169 of file CPURLConnection.j.

- (id) initWithRequest: (CPURLRequest aRequest
delegate: (id)  aDelegate
startImmediately: (BOOL)  shouldStartImmediately 
[implementation]

Definition at line 141 of file CPURLConnection.j.

- (BOOL) isLocalFileConnection   [implementation]

Definition at line 228 of file CPURLConnection.j.

+ (CPData) sendSynchronousRequest: (CPURLRequest aRequest
returningResponse: ({CPURLResponse})  aURLResponse 
[implementation]

Definition at line 97 of file CPURLConnection.j.

+ (CPData) sendSynchronousRequest: (CPURLRequest aRequest
returningResponse: ({CPURLResponse})  aURLResponse
error: (id)  anError 
[implementation]

Definition at line 281 of file CPURLConnection.j.

+ (void) setClassDelegate: (id)  delegate   [implementation]

Definition at line 85 of file CPURLConnection.j.

- (void) start   [implementation]

Definition at line 185 of file CPURLConnection.j.


The documentation for this class was generated from the following file:

Generated on Fri Apr 9 11:04:22 2010 for Cappuccino API by  doxygen 1.6.1