AFNetworking 添加Authorization请求头

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:aUrl]];    
[request setValue:[self getHttpTokenWith:@““] forHTTPHeaderField:@"Authorization"];

 

[self.requestSerializer setValue:TOKEN forHTTPHeaderField:@"Authorization"];
[self.requestSerializer setValue:CONTENT_TYPE forHTTPHeaderField:@"Content-Type"];

 

你可能感兴趣的:(IOS)