AFNetworking&MJRefresh

遇到只能识别Json,而不能识别html的方式,解决方案如下


handle.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"text/plain",@"application/json",@"text/json",@"text/javascript",@"text/html",nil];

//这句话非常重要

handle.responseSerializer = [AFHTTPResponseSerializer serializer];

封装方法


https://github.com/luantianjiao/AFN.git

你可能感兴趣的:(AFNetworking&MJRefresh)