AFOnoResponseSerializer
An XML and HTML response serializer for AFNetworking 2.0, using Ono
Install / Use
/learn @AFNetworking/AFOnoResponseSerializerREADME
AFOnoResponseSerializer
AFOnoResponseSerializer is an XML and HTML response serializer for AFNetworking 2.0, using Ono.
Usage
XML
AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
manager.responseSerializer = [AFOnoResponseSerializer XMLResponseSerializer];
[manager GET:@"http://example.com/foo.xml" parameters:nil success:^(AFHTTPRequestOperation *operation, ONOXMLDocument *responseDocument) {
for (ONOXMLElement *element in [responseDocument XPath:@"//item"]) {
NSLog(@"%@", element);
}
} failure:nil];
HTML
AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
manager.responseSerializer = [AFOnoResponseSerializer HTMLResponseSerializer];
[manager GET:@"http://example.com/bar.html" parameters:nil success:^(AFHTTPRequestOperation *operation, ONOXMLDocument *responseDocument) {
for (ONOXMLElement *element in [responseDocument CSS:@"body ul li"]) {
NSLog(@"%@", element);
}
} failure:nil];
Contact
Mattt Thompson
- http://github.com/mattt
- http://twitter.com/mattt
- m@mattt.me
License
AFOnoResponseSerializer is available under the MIT license. See the LICENSE file for more info.
Related Skills
node-connect
349.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
