Inherits from NSObject
Conforms to CMISCancellableRequest
NSURLConnectionDataDelegate
NSURLConnectionDelegate
Declared in CMISHttpRequest.h

Properties

additionalHeaders

@property (nonatomic, strong) NSDictionary *additionalHeaders

authenticationProvider

@property (nonatomic, strong) id<CMISAuthenticationProvider> authenticationProvider

completionBlock

@property (nonatomic, copy) void ( ^ ) ( CMISHttpResponse *httpResponse , NSError *error ) completionBlock

connection

@property (nonatomic, strong) NSURLConnection *connection

requestBody

@property (nonatomic, strong) NSData *requestBody

requestMethod

@property (nonatomic, assign) CMISHttpRequestMethod requestMethod

response

@property (nonatomic, strong) NSHTTPURLResponse *response

responseBody

@property (nonatomic, strong) NSMutableData *responseBody

Class Methods

startRequest:httpMethod:requestBody:headers:authenticationProvider:completionBlock:

starts a URL request for given HTTP method

+ (id)startRequest:(NSMutableURLRequest *)urlRequest httpMethod:(CMISHttpRequestMethod)httpRequestMethod requestBody:(NSData *)requestBody headers:(NSDictionary *)additionalHeaders authenticationProvider:(id<CMISAuthenticationProvider>)authenticationProvider completionBlock:(void ( ^ ) ( CMISHttpResponse *httpResponse , NSError *error ))completionBlock

Parameters

requestBody

(optional)

additionalHeaders

(optional)

authenticationProvider

(required) completionBlock returns a CMISHTTPResponse object or nil if unsuccessful

Discussion

starts a URL request for given HTTP method

Declared In

CMISHttpRequest.h

Instance Methods

initWithHttpMethod:completionBlock:

initialises with a specified HTTP method

- (id)initWithHttpMethod:(CMISHttpRequestMethod)httpRequestMethod completionBlock:(void ( ^ ) ( CMISHttpResponse *httpResponse , NSError *error ))completionBlock

Discussion

initialises with a specified HTTP method

Declared In

CMISHttpRequest.h

startRequest:

starts the URL request

- (BOOL)startRequest:(NSMutableURLRequest *)urlRequest

Discussion

starts the URL request

Declared In

CMISHttpRequest.h