1.
①:AFHTTPRequestOperationManager *requestManager = [AFHTTPRequestOperationManager manager];
②:requestManager.responseSerializer.acceptableContentTypes = [NSSet setWithObjects:@"text/html", nil];
2.将字典生成json串
①:先转化成二进制流
NSData*data=[NSJSONSerialization dataWithJSONObject:dic options:NSJSONWritingPrettyPrinted error:nil];
②:将二进制流转化成json串
NSString*jsonString=[[NSString alloc]initWithData:data encoding:NSUTF8StringEncoding];
3.当网址中含有特殊字符的时候,就需要将网址进行转码,才可以进行网络请求
NSString *_url = [_strUrl stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];