iOS开发 AFNetworking设置token
2019-01-10 本文已影响0人
LuckyBugGo
AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
AFJSONRequestSerializer *requestSeializer = [AFJSONRequestSerializer serializer];
manager.requestSerializer = requestSeializer;
// 这里才是重点
[manager.requestSerializer setValue:@"token值" forHTTPHeaderField:@"token"];