我有两个返回用户对象的端点。除了创建两个 RKResponseDescriptors 之外,还有一种路径模式格式允许两者一起使用。
RKResponseDescriptor *userResponseDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:userMapping
method:RKRequestMethodAny
pathPattern:@"users"
keyPath:nil
statusCodes:[NSIndexSet indexSetWithIndex:200]];
[objectManager addResponseDescriptor:userResponseDescriptor];
RKResponseDescriptor *userAuthResponseDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:userMapping
method:RKRequestMethodAny
pathPattern:@"auth"
keyPath:nil
statusCodes:[NSIndexSet indexSetWithIndex:200]];
[objectManager addResponseDescriptor:userAuthResponseDescriptor];
有没有办法将它们结合起来?