- AFHTTPRequestOperationManager*manager=[AFHTTPRequestOperationManagermanager];
- manager.securityPolicy=[AFSecurityPolicypolicyWithPinningMode:AFSSLPinningModeNone];
- manager.requestSerializer=[AFJSONRequestSerializerserializer];
- manager.responseSerializer=[AFJSONResponseSerializerserializer];
- [manager.requestSerializersetValue:@"application/json"forHTTPHeaderField:@"Accept"];
- [manager.requestSerializersetValue:@"application/json;charset=utf-8"forHTTPHeaderField:@"Content-Type"];
AFN设置HTTP请求头
原文:http://www.cnblogs.com/arenouba/p/5513585.html