AFNetworking と AFJSONRequestOperation を使用して Authorization ヘッダーを送信しようとしています。setAuthorizationHeaderWithToken の後に httpClient を NSLog すると、ヘッダーにあることがわかりますが、送信先のサーバーを確認すると、Authorization ヘッダーを受信していないようです (他の部分を受信します)。
AFJSONRequestOperation は、Authorization 部分を追加していないヘッダーで何かを行いますか?
NSURL *url = [NSURL URLWithString:kBaseURL];
AFHTTPClient *httpClient = [[AFHTTPClient alloc] initWithBaseURL:url];
NSMutableURLRequest *request = [httpClient requestWithMethod:@"POST" path:@"/" parameters:params];
[httpClient setAuthorizationHeaderWithToken:@"test"];
AFJSONRequestOperation *operation = nil;
operation = [AFJSONRequestOperation
JSONRequestOperationWithRequest:request
success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) {
}
failure:^(NSURLRequest *request , NSHTTPURLResponse *response, NSError *error , id JSON ){
}];
[operation start];