-(void)getMethodUsingNSURLSession
{
NSURLSession *session = [NSURLSession sharedSession];
[[session dataTaskWithURL:[NSURL URLWithString:@"http://four-developers.com/service1.svc/GetData/aa"]
completionHandler:^(NSData *data,
NSURLResponse *response,
NSError *error) {
NSError *err = nil ;
NSDictionary *responseDict = [ NSJSONSerialization JSONObjectWithData :data options : 0 error :&err];
dict = [responseDict objectForKey : @"GetDataResult" ];
NSLog(@"%@",dict);
}] resume];
}
No comments:
Post a Comment