Conforms to NSObject
Declared in RKRequest.h

Overview

Lifecycle events for an RKRequest object

Tasks

Observing Request Progress

Handling Successful Requests

Handling Failed Requests

Instance Methods

request:didFailLoadWithError:

Sent when a request has failed due to an error

- (void)request:(RKRequest *)request didFailLoadWithError:(NSError *)error

Parameters

request

The RKRequest object that was handling the loading.

error

An NSError object containing the RKRestKitError that triggered the callback.

Declared In

RKRequest.h

request:didLoadResponse:

Sent when a request has finished loading

- (void)request:(RKRequest *)request didLoadResponse:(RKResponse *)response

Parameters

request

The RKRequest object that was handling the loading.

response

The RKResponse object containing the result of the request.

Declared In

RKRequest.h

request:didReceiveData:totalBytesReceived:totalBytesExpectedToReceive:

Sent when request has received data from remote site

- (void)request:(RKRequest *)request didReceiveData:(NSInteger)bytesReceived totalBytesReceived:(NSInteger)totalBytesReceived totalBytesExpectedToReceive:(NSInteger)totalBytesExpectedToReceive

Parameters

request

The RKRequest object that is handling the loading.

bytesReceived

An integer of the bytes of the chunk just received from the remote site.

totalBytesReceived

An integer of the total bytes that have been received from the remote site.

totalBytesExpectedToReceive

An integer of the total bytes that will be received from the remote site.

Declared In

RKRequest.h

request:didReceiveResponse:

Sent when a request has received a response from the remote host.

- (void)request:(RKRequest *)request didReceiveResponse:(RKResponse *)response

Parameters

request

The RKRequest object that received a response.

response

The RKResponse object for the HTTP response that was received.

Declared In

RKRequest.h

request:didSendBodyData:totalBytesWritten:totalBytesExpectedToWrite:

Sent when a request has uploaded data to the remote site

- (void)request:(RKRequest *)request didSendBodyData:(NSInteger)bytesWritten totalBytesWritten:(NSInteger)totalBytesWritten totalBytesExpectedToWrite:(NSInteger)totalBytesExpectedToWrite

Parameters

request

The RKRequest object that is handling the loading.

bytesWritten

An integer of the bytes of the chunk just sent to the remote site.

totalBytesWritten

An integer of the total bytes that have been sent to the remote site.

totalBytesExpectedToWrite

An integer of the total bytes that will be sent to the remote site.

Declared In

RKRequest.h

requestDidCancelLoad:

Sent to the delegate when a request was cancelled

- (void)requestDidCancelLoad:(RKRequest *)request

Parameters

request

The RKRequest object that was cancelled.

Declared In

RKRequest.h

requestDidStartLoad:

Sent when a request has started loading

- (void)requestDidStartLoad:(RKRequest *)request

Parameters

request

The RKRequest object that has begun loading.

Declared In

RKRequest.h

requestDidTimeout:

Sent to the delegate when a request has timed out. This is sent when a backgrounded request expired before completion.

- (void)requestDidTimeout:(RKRequest *)request

Parameters

request

The RKRequest object that timed out.

Declared In

RKRequest.h

requestWillPrepareForSend:

Tells the delegate the request is about to be prepared for sending to the remote host.

- (void)requestWillPrepareForSend:(RKRequest *)request

Parameters

request

The RKRequest object that is about to be sent.

Declared In

RKRequest.h