我刚接触AFNetworking,知道如何传递URL参数,但我该如何在同一个调用中传递头信息。
我还将我的AFHTTPSessionManager子类化。
请查看下面的代码:
- (void)getExpenses:(NSString *)page
success:(void (^) (NSArray *myExpenses))success
failure:(RequestFailureBlock)failure
{
NSString *resourceURL = [NSString stringWithFormat:@"%@/expenses/", APIBaseURLString];
NSDictionary *parameters = @{@"page":page, @"Authorization": APIAuthorization};
[self getExpenses:resourceURL parameters:parameters success:success failure:failure];
}