Hi, I am trying to make a web call with the iPhone. I have done this before and it works fine but now I can't make it work. I am trying to use the following method call which the documentation says is availble in 2.0 and later:
- (void)addValue:(NSString *)value forHTTPHeaderField:(NSString *)field;
I am attempting to build for version 3.2 and 4.0.
NSMutableURLRequest *request = [NSURLRequest
requestWithURL:url
cachePolicy:NSURLRequestReloadIgnoringCacheData
timeoutInterval:30];
[request addValue:@"0" forHTTPHeaderField:@"Content-Length"];
The error that I'm getting is a runtime error that says
"-[NSURLRequest addValue:forHTTPHeaderField:]: unrecognized selector sent to instance 0x600e0c0"
Can anyone tell me what I am missing that stops this code from working?
Thanks.