RestKit GET Request with queryParameter: no matching responseDescriptor

一笑奈何 提交于 2019-12-11 13:43:36

问题


I'm trying to do a request with Restkit, but I get the following Error:

{Error Domain=org.restkit.RestKit.ErrorDomain Code=1001 "No mappable object representations were found at the key paths searched." UserInfo={NSLocalizedDescription=No mappable object representations were found at the key paths searched., NSLocalizedFailureReason=The mapping operation was unable to find any nested object representations at the key paths searched: 
This likely indicates that you have misconfigured the key paths for your mappings., keyPath=null, DetailedErrors=(
)}}, keyPath=null, NSLocalizedDescription=No response descriptors match the response loaded.}

Request-URL is: http://www.iwi.hs-karlsruhe.de/hskampus-news/api/kampus-api.php?getCategoriesNiceJSON

ResponseDescriptor looks like:

let newsCategoryResponseDescriptor = RKResponseDescriptor(mapping: NewsCategory.restKitObjectMapping(), method: RKRequestMethod.GET, pathPattern: Constants.Backend.NewsCategoryResource, keyPath: nil, statusCodes: RKStatusCodeIndexSetForClass(RKStatusCodeClass.Successful))

PathPattern:

hskampus-news/api/kampus-api.php?getCategoriesNiceJSON

How can I configure my ResponseDescripter to match my request with the URL-Parameter?

来源:https://stackoverflow.com/questions/36721011/restkit-get-request-with-queryparameter-no-matching-responsedescriptor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!