HRRequestOperation Class Reference

#import <HRRequestOperation.h>

List of all members.


Static Public Member Functions

(HRRequestOperation *) + requestWithMethod:path:options:object:

Protected Attributes

NSObject< HRResponseDelegate > * _delegate
 HRResponse Delegate.
NSURLConnection * _connection
 Connection object.
NSMutableData * _responseData
 Data received from response.
NSString * _path
 The path or URL to use in REST methods.
NSDictionary * _options
 Contains all options used by the request.
NSTimeInterval _timeout
 How long before the request will timeout.
HRRequestMethod _requestMethod
 The request method to use.
id _formatter
 The HRFormatter object.
id _object
 The object passed to all delegate methods.
BOOL _isFinished
 Determines whether the operation is finished.
BOOL _isExecuting
 Determines whether the operation is executing.
BOOL _isCancelled
 Determines whether the connection is cancelled.

Properties

NSObject< HRResponseDelegate > * delegate
 The HRResponseDelegate.
NSTimeInterval timeout
 The lenght of time in seconds before the request times out.
HRRequestMethod requestMethod
 The REST method to use when performing a request.
NSString * path
 The relative path or url string used in a request.
NSDictionary * options
 An NSDictionary containing all the options for a request.
id formatter
 The formatter used to decode the response body.

Detailed Description

The object which all requests are routed through. You shouldn't need to use this class directly, but instead use HRRestModel which wraps the method of this class neatly.

Member Function Documentation

+ (HRRequestOperation *) requestWithMethod: (HRRequestMethod method
path: (NSString*)  urlPath
options: (NSDictionary*)  requestOptions
object: (id)  obj 

Returns an HRRequestOperation


Property Documentation

- (NSObject<HRResponseDelegate>*) delegate [read, assign]

The HRResponseDelegate responsible for handling the success and failure of a request.

- (id) formatter [read, retain]

Currently, only JSON is supported.

- (NSDictionary*) options [read, write, retain]

This needs documented

- (NSString*) path [read, write, copy]

If you provide a relative path here, you must set the baseURL option. If given a full url this will overide the baseURL option.

- (HRRequestMethod) requestMethod [read, write, assign]

This defaults to HRRequestMethodGet. Valid options are HRRequestMethod.

- (NSTimeInterval) timeout [read, write, assign]

Sets the length of time in seconds before a request will timeout. This defaults to 30.0.


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