【发布时间】:2013-09-18 12:58:08
【问题描述】:
RKObjectManager documentation 展示了如何构造这条路线
[manager.router.routeSet addRoute:[RKRoute routeWithName:@"follow_user" pathPattern:@"/users/:userID/follow" method:RKRequestMethodPOST]];
- 我需要先发出请求才能设置一些标头。
- 我需要提供我要发布的对象。
- 我需要指定一个字典,其中包含要在路由的路径模式中匹配的用户 ID
如何使用该路由发出 url 请求以发布对象?
编辑:
requestWithPathForRouteNamed:object:parameters: 不允许我提供要发布的对象。 requestWithObject:method:path:parameters: 不允许我提供包含要在路由的路径模式中匹配的 userID 的字典
实际上我需要类似的东西:
- (NSMutableURLRequest *) requestWithObject:(id)objectToSend
forRouteNamed:(NSString *)routeName
routeParameters:(NSDictionary *)routeParameters;
【问题讨论】:
标签: ios restkit restkit-0.20