Как то так.
Не уверен что вызвал тот метод
dataTaskWithRequest
Но он тоже должен сработать в этом случае.
#import <AFNetworking.h>
NSString *urlString = @"https://api...";
NSURL *url = [NSURL URLWithString:urlString];
NSMutableURLRequest *mutableURLRequest = [NSMutableURLRequest requestWithURL:url];
NSMutableData *requestBodyData = [NSMutableData data];
mutableURLRequest.HTTPBody = requestBodyData;
mutableURLRequest.HTTPMethod = @"POST";
NSString *accessToken = @"accessToken";
NSString *value = [NSString stringWithFormat:@"Bearer %@", accessToken];
[mutableURLRequest setValue:value forHTTPHeaderField:@"Authorization"];
[mutableURLRequest setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
[[AFHTTPSessionManager manager] dataTaskWithRequest:mutableURLRequest completionHandler:^(NSURLResponse * _Nonnull response,
id _Nullable responseObject,
NSError * _Nullable error) {
//We do not reach this code block !
// Save the incoming data to CoreData
completionHandler(UIBackgroundFetchResultNewData);
}];