ActiveResourceKit  v1.2 (498.0)
 All Classes Files Functions Variables Typedefs Enumerator Properties Macros Pages
Classes | Functions
ARResource+Private.h File Reference
#import <ActiveResourceKit/ARResource.h>
Include dependency graph for ARResource+Private.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

category  ARResource(Private)
 

Functions

NSNumber * ARIDFromResponse (ARHTTPResponse *response)
 Extracts the resource identifier from the given HTTP response.
 
BOOL ARResponseCodeAllowsBody (NSInteger code)
 Determines whether the HTTP 1.1 specification allows a response to have a body (see section 4.4.1 of the specification).
 

Function Documentation

NSNumber* ARIDFromResponse ( ARHTTPResponse response)

Extracts the resource identifier from the given HTTP response.

The HTTP response includes a Location header field specifying the resource's full resource location. Rails places the resource ID at the last element in the location path. The implementation extracts this element using a regular expression.

Returns
Answers an NSNumber numerical identifier based on the response location field. Answers nil if the response does not contain a Location header, or if the Location field does not match the format "/foo/bar/1".

Definition at line 30 of file ARResource+Private.m.

BOOL ARResponseCodeAllowsBody ( NSInteger  code)

Determines whether the HTTP 1.1 specification allows a response to have a body (see section 4.4.1 of the specification).

Definition at line 48 of file ARResource+Private.m.