GravityRequest Class Reference

Inherits from NSObject
Conforms to NSURLConnectionDataDelegate
NSURLConnectionDelegate
Declared in GravityRequest.h
GravityRequest.m

Overview

A request to the Gravity service

Other Methods

  type

Type of the request

@property GravityRequestType type

Discussion

Type of the request

Declared In

GravityRequest.h

  method

The called method

@property NSString *method

Discussion

The called method

Declared In

GravityRequest.h

  params

URL parameters of the request

@property NSMutableArray *params

Discussion

URL parameters of the request

Declared In

GravityRequest.h

  body

Body of the request

@property NSData *body

Discussion

Body of the request

Declared In

GravityRequest.h

  connection

The relevant connection object

@property NSURLConnection *connection

Discussion

The relevant connection object

Declared In

GravityRequest.h

  response

Response of the server

@property NSMutableData *response

Discussion

Response of the server

Declared In

GravityRequest.h

  completed

The request is completed or not

@property (readonly, getter=isCompleted) BOOL completed

Discussion

The request is completed or not

Declared In

GravityRequest.h

  itemRecommendation

The received recommendation

@property (readonly) GravityItemRecommendation *itemRecommendation

Discussion

The received recommendation

Declared In

GravityRequest.h

  itemRecommendations

@property (readonly) NSMutableArray *itemRecommendations

  completionHandler

Completion handler of the request

@property (nonatomic, copy) GravityRequestCompletionHandler completionHandler

Discussion

Completion handler of the request

Declared In

GravityRequest.h

– initWithClient:andType:

Initalizes a GravityRequest connection with an URL

- (id)initWithClient:(GravityClient *)client andType:(GravityRequestType)type

Parameters

client

the GravityClient

type

the GravityRequestType

Return Value

an initialized GravityRequest object

Discussion

Initalizes a GravityRequest connection with an URL

Declared In

GravityRequest.h

– send

Sends the GravityRequest of the GravityClient

- (void)send

Discussion

Sends the GravityRequest of the GravityClient

Declared In

GravityRequest.h

Other Methods

– connection:willSendRequestForAuthenticationChallenge:

- (void)connection:(NSURLConnection *)connection willSendRequestForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge

– connection:didFailWithError:

- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error

– connection:didReceiveData:

- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data

– connectionDidFinishLoading:

- (void)connectionDidFinishLoading:(NSURLConnection *)connection