@H_403_4@
所以我对这两个功能的区别有多么困惑,或者至少是如何将它们合并在一起.我有这种情况,我有这个描述符:
RKResponseDescriptor *responsePlant = [RKResponseDescriptor responseDescriptorWithMapping:plantMapping pathPattern:@"/api/rest/plants/:plant_id" keyPath:nil statusCodes:RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful)];
现在,我想做这样的事情
RKResponseDescriptor *responsePlantAll = [RKResponseDescriptor responseDescriptorWithMapping:plantMapping pathPattern:@"/api/rest/plants/" keyPath:@"objects" statusCodes:RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful)];
请注意,keyPath在一个地方是零,而在另一个地方则不是.
这有效…但它是很多副本粘贴.我可以使用RKRouter吗?
非常感谢!
@H_403_4@