< HRResponseDelegate > Protocol Reference

#import <HRResponseDelegate.h>

List of all members.


Public Member Functions

(void) - restConnection:didReturnResource:object:
(void) - restConnection:didFailWithError:object:
(void) - restConnection:didReceiveResponse:object:
(void) - restConnection:didReceiveError:response:object:
(void) - restConnection:didReceiveParseError:responseBody:object:

Detailed Description

Implementing the HRResponseDelegate protocol allows you to handle requests.

Member Function Documentation

- (void) restConnection: (NSURLConnection *)  connection
didFailWithError: (NSError *)  error
object: (id)  object 
[optional]

Called when the connection fails in situations where the server is not available, etc.

Parameters:
connection The connection object for the current request
error The error returned by the connection.
object Any custom object you passed in while making the request.

- (void) restConnection: (NSURLConnection *)  connection
didReceiveError: (NSError *)  error
response: (NSHTTPURLResponse *)  response
object: (id)  object 
[optional]

Called when the connection receieves a statusCode that isn't a success code.

Parameters:
connection The connection object for the current request
error The error returned by the connection.
response The response object returned by the server.
object Any custom object you passed in while making the request.

- (void) restConnection: (NSURLConnection *)  connection
didReceiveParseError: (NSError *)  error
responseBody: (NSString *)  body
object: (id)  object 
[optional]

Called when the HRFormatter recieved an error parsing the response data.

Parameters:
connection The connection object for the current request
error The parser error returned by the formatter.
body A string representation of the response body returned by the server.
object Any custom object you passed in while making the request.

- (void) restConnection: (NSURLConnection *)  connection
didReceiveResponse: (NSHTTPURLResponse *)  response
object: (id)  object 
[optional]

Called when the connection receieves any type of response

Parameters:
connection The connection object for the current request
response The response object returned by the server.
object Any custom object you passed in while making the request.

- (void) restConnection: (NSURLConnection *)  connection
didReturnResource: (id)  resource
object: (id)  object 
[optional]

Called when the resource was succeffully fetched and encoded

Parameters:
connection The connection object for the current request
resource The converted objc representation of the response data returned by the server.
object Any custom object you passed in while making the request.


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