我正在使用restkit,我在解析xml时遇到问题:
Unable to find parser for MIME Type 'text/xml charset=utf-8'
Encountered unexpected response with status code: 200 (MIME Type: text/xml charset=utf-8)
不支持吗?
答案 0 :(得分:0)
如果您无法修改服务器,只需在RKParserRegistry中使用XML解析器注册mimetype:
[[RKParserRegistry sharedRegistry] setParserClass:[[[RKParserRegistry sharedRegistry] parserForMIMEType:RKMIMETypeXML] class]
forMIMEType:@"text/xml charset=utf-8"];