AFNetworking 3.0 添加HTTP Header
2016-07-18 本文已影响729人
XLsn0w
AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
/*! [key : value格式] {@"Authorization" : @"Bearer空格Token"} */
[manager.requestSerializer setValue:[NSStringstringWithFormat:@"Bearer %@", token] forHTTPHeaderField:@"Authorization"];