码迷,mamicode.com
首页 > Web开发 > 详细

AFN设置HTTP请求头

时间:2016-05-20 23:49:48      阅读:1131      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!