Hey all,
I posted early about getting the HTTP Headers and I thought I sovled the problem but the status code doesn't seem to be working. When I use the line
Code:
NSLog(@"%d", [httpResponse statusCode]);
It always prints out 200 even if the url i entered is "dsfafafvf". I don't think this is suppose to happen is it?
My code for getting the status code is
Code:
- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *)response;
NSLog(@"%d", [httpResponse statusCode]);
[dataWebService setLength:0];
}
And the web call is
Code:
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.google.ca"]]];
Thanks