Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NSURL *url = nil;
- NSMutableURLRequest *request = nil;
- NSString *getURL = [NSString stringWithFormat:@"%@?TEST=%@",URL, str];
- url = [NSURL URLWithString: getURL];
- request = [NSMutableURLRequest requestWithURL:url];
- [request setHTTPMethod:@"GET"];
- [request addValue: @"application/x-www-form-urlencoded; charset=utf-8" forHTTPHeaderField:@"Content-Type"];
- NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
- if(connection) //Always true!!!
- {
- mutableData = [NSMutableData new];
- NSLog(@"SERVER CONNECTION OK");
- }
- else
- {
- NSLog(@"NO SERVER CONNECTION");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement