首页 > Web开发 > 详细

AFN设置HTTP请求头

时间:2016-05-20 23:49:03      阅读:458      评论:0      收藏:0      [点我收藏+]
  1. AFHTTPRequestOperationManager*manager=[AFHTTPRequestOperationManagermanager];
  2. manager.securityPolicy=[AFSecurityPolicypolicyWithPinningMode:AFSSLPinningModeNone];
  3. manager.requestSerializer=[AFJSONRequestSerializerserializer];
  4. manager.responseSerializer=[AFJSONResponseSerializerserializer];
  5. [manager.requestSerializersetValue:@"application/json"forHTTPHeaderField:@"Accept"];
  6. [manager.requestSerializersetValue:@"application/json;charset=utf-8"forHTTPHeaderField:@"Content-Type"]; 

AFN设置HTTP请求头

原文:http://www.cnblogs.com/arenouba/p/5513585.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!