Skip to content

Commit 939f45b

Browse files
committed
Add note about escaping path patterns to the main RKObjectManager.h header docs. refs RestKit#1091
1 parent 477d04b commit 939f45b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Code/Network/RKObjectManager.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,11 @@ RKMappingResult, RKRequestDescriptor, RKResponseDescriptor;
8585
8686
Once a path pattern has been registered via the routing system, the manager can automatically build full request URL's when given nothing but the object to be sent.
8787
88-
The second use case of path patterns is in the matching of path into a dictionary of attributes. In this case, the path pattern is evaluatd against a string and used to construct an `NSDictionary` object containing the matched key paths, optionally including the values of a query string. This functionality is provided via the `RKPathMatcher` class and is discussed in detail in the accompanying documentation.
88+
The second use case of path patterns is in the matching of path into a dictionary of attributes. In this case, the path pattern is evaluatd against a string and used to construct an `NSDictionary` object containing the matched key paths, optionally including the values of a query string. This functionality is provided via the `RKPathMatcher` class and is discussed in detail in the accompanying documentation.
89+
90+
### Escaping Path Patterns
91+
92+
Note that path patterns will by default interpret anything prefixed with a period that follows a dynamic path segment as a key path. This can cause an issue if you have a dynamic path segment that is followed by a file extension. For example, a path pattern of '/categories/:categoryID.json' would be erroneously interpretted as containing a dynamic path segment whose value is interpolated from the 'categoryID.json' key path. This key path evaluation behavior can be suppressed by escaping the period preceding the non-dynamic part of the pattern with two leading slashes, as in '/categories/:categoryID\\.json'.
8993
9094
## Request and Response Descriptors
9195

0 commit comments

Comments
 (0)