I'm about to upgrade AFNetworking
from 1.x to 3.x. My question is what is the different between AFHTTPSessionManager
and AFURLSessionManager
? and when to use each? Which one support both XML
and JSON
request and response? Thanks
相关问题
- Jackson Deserialization not calling deserialize on
- Illegal to have multiple roots (start tag in epilo
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Easiest way to get json and parse it using JQuery
相关文章
- json_encode 没有把数组转为json
- Livy Server: return a dataframe as JSON?
- Creating XML Elements without namespace declaratio
- Get Attribute Value From Simple XML Using JQuery /
- Unexpected end of JSON input from an ajax call
- How do I do a nested list (array) of schema refere
- iconv() Vs. utf8_encode()
- Convert C# Object to Json Object
You generally use
AFHTTPSessionManager
if you want to doGET
orPOST
requests that might include preparation of JSON orx-www-formurlencoded
requests or parsing of complex responses. You can get away withAFURLSessionManager
if you're doing very simple requests for which you don't need any of the additionalAFHTTPSessionManager
capabilities.Bottom line,
AFHTTPSessionManager
is just a subclass ofAFURLSessionManager
with some richer creation of complex requests and/or parsing of complex responses. Based upon your question (parsing XML and JSON responses),AFHTTPSessionManager
is what you want to use.