We are doing Head Request using NSURLSession,
The request is,
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:contentPlaybackURL cachePolicy:1 timeoutInterval:15];
[request addValue:@"1" forHTTPHeaderField:@"getContentFeatures.dlna.org"]; [request addValue:@"1" forHTTPHeaderField:@"getAvailableSeekRange.dlna.org"]; [request setHTTPMethod:@"HEAD"];
NSURLSession *session = [NSURLSession sessionWithConfiguration:[NSURLSessionConfiguration ephemeralSessionConfiguration] delegate:nil delegateQueue:nil]; NSURLSessionDataTask *task = [session dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) { requestError = [error copy];
taskComplete = YES;
}];
Getting error with no error message and error code is -1001, because of low bandwidth, where has in high bandwidth its working.
If we use the "NSURLSessionTaskDelegate" will it give additional information like error message ?