Parser for MIME Type 'text/xml charset=utf-8'
-
27-10-2019 - |
سؤال
I am using restkit and I have problems parsing an 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)
Isn't it supported?
المحلول
If you can't modify the server just register the mimetype with XML parser in RKParserRegistry:
[[RKParserRegistry sharedRegistry] setParserClass:[[[RKParserRegistry sharedRegistry] parserForMIMEType:RKMIMETypeXML] class]
forMIMEType:@"text/xml charset=utf-8"];
لا تنتمي إلى StackOverflow