0

我正在使用 RESTKit 进行 GET 请求,并且我的 RKResponseDescriptor 已弃用。我知道这是因为我没有方法参数,但我不知道我会为方法参数放什么。这是我当前的代码:

RKResponseDescriptor *nameResponseDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:nameMapping                                                                                                  
    //I don't know what would go here under method
    method:(RKRequestMethod)method                                                                                   
    pathPattern:@"/projects/20090611/providers/find"                                                                                             
    keyPath:@"providers"                                                                                         
    statusCodes:statusCodeSet];
4

1 回答 1

3

很简单,您将参数设置为,RKRequestMethodGET因为它是发出 GET 请求时要使用的响应描述符。

于 2013-08-06T22:20:45.840 回答