I am looking at NSURLProtocol and am trying to insert some headers.
- (void)startLoading {
NSMutableURLRequest *newRequest = [self.request mutableCopy];
[NSURLProtocol setProperty:@YES forKey:kAccessCodeProtocolKey inRequest:newRequest];
self.connection = [NSURLConnection connectionWithRequest:self.request delegate:self];
}
But my startLoading is never called
Have you implemented canInitWithRequest: ? Does it return YES? If not, startLoading will never be called.