Inherits from NSObject
Declared in PKRequest.h
PKRequest.m

Overview

A class describing an API request. A request is used by PKRequestManager to create and enque a new PKRequestOperation instance.

Tasks

Class Methods

requestWithURI:method:

The resource URI path.

+ (PKRequest *)requestWithURI:(NSString *)uri method:(PKRequestMethod)method

Parameters

uri

The resource URI path.

method

The request method.

Return Value

A request.

Declared In

PKRequest.h

requestWithURI:method:objectMapping:

The resource URI path.

+ (PKRequest *)requestWithURI:(NSString *)uri method:(PKRequestMethod)method objectMapping:(PKObjectMapping *)objectMapping

Parameters

uri

The resource URI path.

method

The request method.

objectMapping

The object mapping used to map the result data to the corresponding domain object.

Return Value

A request.

Declared In

PKRequest.h

Instance Methods

initWithURI:method:

The resource URI path.

- (id)initWithURI:(NSString *)uri method:(PKRequestMethod)method

Parameters

uri

The resource URI path.

method

The request method.

Return Value

The request.

Declared In

PKRequest.h

initWithURI:method:objectMapping:

The resource URI path.

- (id)initWithURI:(NSString *)uri method:(PKRequestMethod)method objectMapping:(PKObjectMapping *)objectMapping

Parameters

uri

The resource URI path.

method

The request method.

objectMapping

The object mapping used to map the result data to the corresponding domain object.

Return Value

The request.

Declared In

PKRequest.h

startWithCompletionBlock:

Creates a request operation for this request and adds it to the network queue.

- (PKRequestOperation *)startWithCompletionBlock:(PKRequestCompletionBlock)completionBlock

Parameters

completionBlock

A block to be executed after the request operation completes and data has been mapped.

Return Value

The request operation that was added to the network queue. This reference

Discussion

Creates a request operation for this request and adds it to the network queue.

Declared In

PKRequest.h