title: <NSMutableURLRequest: 0x1c0c7ae0> { URL: (null) } in Objective C
body: <p>getting issue with the following code</p>
  
  <pre><code>-(void)AddEmpService:(NSDictionary *)params
  {
  
      recordResults = FALSE;
      OutPutStringName = [[NSMutableString alloc] init];
      [OutPutStringName appendString: @"string"];
  
      NSString *urlstr =[NSString stringWithFormat:@"http://www.seen.com/SeenApi/Service.svc/EmpService?type=Insert&amp;Id=&amp;ClassId=%@&amp;Name=%@&amp;Desg=%@&amp;Age=%@&amp;Add=%@&amp;Sal=%@&amp;Gend=%@&amp;Phone=%@&amp;EmpId=%@",[params objectForKey:@"Id"],[params objectForKey:@"EmpName"],[params objectForKey:@"EmpDesignation"],[params objectForKey:@"EmpAge"],[params objectForKey:@"EmpAddress"],[params objectForKey:@"EmpSalary"],[params objectForKey:@"EmpGender"],[params objectForKey:@"EmpPhone"],[params objectForKey:@"EmpId"]];
  
      NSLog(@"dict is %@",params);
      urlstr=[urlstr stringByReplacingOccurrencesOfString:@" " withString:@"%20"];
      NSLog(@"%@",urlstr);
      NSURL *url=    [NSURL URLWithString:urlstr];
      NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:url];
      NSLog(@"the request %@",theRequest);
      [theRequest addValue: @"text/xml; charset=utf-8" forHTTPHeaderField:@"Content-Type"];
      NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self];
      if( theConnection )
      {
          webData = [NSMutableData data];
      }
      else
      {
          NSLog(@"theConnection is NULL");
      }
  
  }
  </code></pre>
  
  <p>NSLog(@"%@",urlstr); is</p>
  
  <pre><code>http://www.seen.com/SeenApi/Service.svc/EmpService?type=Insert&amp;Id=&amp;ClassId=63&amp;Name=Mark&amp;Desg=Teacher&amp;Age=25&amp;Add=New%%20York&amp;Sal=5000&amp;Gend=Male&amp;Phone=0987654321&amp;EmpId=235
  </code></pre>
  
  <p>But getting the null for
  NSLog(@"the request %@",theRequest);</p>
  
  <pre><code>the request &lt;NSMutableURLRequest: 0x1c0c7ae0&gt; { URL: (null) }
  2017-11-21 14:07:36.262 Emp[7070:2394869] ERROR with theConenction
  </code></pre>
  
  <p>Please help me to figure out the issue.TIA</p>