我有这段代码:
[RKResponseDescriptor responseDescriptorWithMapping:someMapping
method:RKRequestMethodGET
pathPattern:[NSString stringWithFormat:@"/%@/some/search", BASE_URL_API]
keyPath:@"results"
statusCodes:RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful)],
[RKResponseDescriptor responseDescriptorWithMapping:someMapping
method:RKRequestMethodGET
pathPattern:[NSString stringWithFormat:@"/%@/some/:code", BASE_URL_API]
keyPath:nil
statusCodes:RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful)],
并且最后一个工作。我为"结果"添加了一条路线。它没有用。
我在GitHub中添加了对这篇文章的评论