RBRestClientDelegate Protocol Reference

Conforms to NSObject
Declared in RBRestClient.h

Overview

A delegate to receive rest client events.

– restClientWillCancelAllRequests:

Called when the RBRestClient object will cancel all outstanding network jobs.

- (void)restClientWillCancelAllRequests:(nonnull RBRestClient *)restClient

Parameters

restClient

The RBRestClient object.

Declared In

RBRestClient.h

– restClientDidCancelAllRequests:

Called when the RBRestClient object did cancel all outstanding network jobs.

- (void)restClientDidCancelAllRequests:(nonnull RBRestClient *)restClient

Parameters

restClient

The RBRestClient object.

Declared In

RBRestClient.h

– restClient:willPerformRequest:

Called before the RBRestClient object will perform a request. Use this to transform or observe the requests being performed.

- (nonnull NSURLRequest *)restClient:(nonnull RBRestClient *)restClient willPerformRequest:(nonnull NSURLRequest *)request

Parameters

restClient

The RBRestClient object.

request

The request that is intended to be performed.

Return Value

The request that will be performed. nil is not a valid return value.

Declared In

RBRestClient.h

– restClient:willReceiveResponse:forRequest:

Called before the RBRestClient object will process the received response. Use this to transform or observe the raw responses.

- (nonnull RBNetworkResponse *)restClient:(nonnull RBRestClient *)restClient willReceiveResponse:(nonnull RBNetworkResponse *)response forRequest:(nonnull NSURLRequest *)request

Parameters

restClient

The RBRestClient object.

response

The response object that is intended to be processed.

request

The request that is being performed.

Return Value

The response object that will be processed.

Declared In

RBRestClient.h

– restClient:didReceiveFinalResponse:forRequest:

Called after the final response has been received and the completion block called.

- (void)restClient:(nonnull RBRestClient *)restClient didReceiveFinalResponse:(nonnull RBNetworkResponse *)response forRequest:(nonnull NSURLRequest *)request

Parameters

restClient

The RBRestClient object.

response

The final response object that was received.

request

The request that was performed.

Declared In

RBRestClient.h

– restClient:willReceiveJsonResponse:forRequest:

Called before the RBRestClient object will process the received JSON response. Use this to transform or observe the JSON responses.

- (nonnull id)restClient:(nonnull RBRestClient *)restClient willReceiveJsonResponse:(nullable id)jsonResponse forRequest:(nonnull NSURLRequest *)request

Parameters

restClient

The RBRestClient object.

jsonResponse

The JSON response that is intended to be processed.

request

The request that is being performed.

Return Value

The JSON response that will be processed.

Declared In

RBRestClient.h

– restClient:didReceiveFinalJsonResponse:forRequest:

Called after the final response has been received and the completion block called.

- (void)restClient:(nonnull RBRestClient *)restClient didReceiveFinalJsonResponse:(nullable id)jsonResponse forRequest:(nonnull NSURLRequest *)request

Parameters

restClient

The RBRestClient object.

jsonResponse

The final JSON response that was received.

request

The request that was performed.

Declared In

RBRestClient.h