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"];
上一篇下一篇

猜你喜欢

热点阅读