Restkit, put parameters in path
ios, objective-c, restkit, restkit-0.20
Solution
Set your path pattern to:
pathPattern:@"country/search/:query"
See sockit for a description of hoe the path pattern matching works.
Also, ensure that your leading slashes match.
Problem
I want to consume this api endpoint ``` .../country/search/{query} ``` another way would be ``` .../country/search?query={query} ``` however the api does not support that. How can I support the first style with restkit and not violate the path pattern? ``` pathPattern:@"/country/search/" ``` is not recognized by ``` getObjectsAtPath:[NSString stringWithFormat:@"country/search/%@", query] ``` so restkit fails to load the correct mapping.