-(void)getMethod
{
NSURLRequest *request = [NSURLRequest requestWithURL:
[NSURL URLWithString:@"http://four-developers.com/service1.svc/GetData/aa"]];
[NSURLConnection sendAsynchronousRequest:request
queue:[NSOperationQueue mainQueue]
completionHandler:^(NSURLResponse *response,
NSData *data,
NSError *connectionError)
{
NSError *err = nil ;
NSMutableDictionary* arr = [NSJSONSerialization JSONObjectWithData:data options:0 error:&err];
NSMutableDictionary* dict = [arr objectForKey:@"GetDataResult"];
NSLog(@"%@",dict);
}];
}
No comments:
Post a Comment