title: What is real issue with the NSData in my code
body: <p>I want to send json service when the user search text on searchbar. Here the issue  is that I return null value of NSData object, what the issue is here? If I define the same url which I print in console that works but what's the issue here? </p>
  
  <pre><code>-(void)doIt{
  
      NSURL *url = [NSURL URLWithString:weburls];
      NSData *data =[NSData dataWithContentsOfURL:url];
      [self getData:data];
  }
  </code></pre>
  
  <p>If I will write like that then it works, but I want to call the service on the searchbar event but there is a problem</p>
  
  <pre><code>NSString *weburl = [NSString stringWithFormat:@"%@%@",
  @"http://192.168.1.196/ravi/iphonephp?mname=",searchText];
  NSLog(@"%@",weburl);
  
  NSURL *url = [NSURL URLWithString:weburl];
  NSLog(@"the url is : %@",url);
  
  NSError *error;
  
  NSData *data =[NSData dataWithContentsOfURL:url options:nil error:&amp;error];
  NSLog(@"Data is :%@",data);
  
  NSLog(@"the Error massage is : %@",error);
  [self getData:data];
  </code></pre>
  
  <p>Gives me console value like </p>
  
  <pre><code>customCellDemo[1553:f803] the url is : http://192.168.1.196/ravi/iphonephp?mname=a
  
  2012-03-16 15:26:36.259 customCellDemo[1553:f803] Data is :(null)
  
  2012-03-16 15:26:43.624 customCellDemo[1553:f803] the Error massage is : Error 
  Domain=NSCocoaErrorDomain Code=256 "The operation couldn’t be completed. (Cocoa error 256.)" 
  UserInfo=0x6ab2760 {NSURL=http://192.168.1.196/ravi/iphonephp?mname=a}
  </code></pre>