title: POST request timeout ONLY on device using NSURLConnection sendSynchronousRequest
body: <p>I am trying to make POST request using NSURLConnection sendSynchronousRequest. It works great when I run app on Simulator, but on real device I got timeout error (NSURLErrorDomain" - code: -1001), my server works ok</p>
  
  <p>My code:</p>
  
  <pre><code> NSMutableURLRequest * request = [NSMutableURLRequest requestWithURL:url
                                                          cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                      timeoutInterval:30];
  
  
  [request setURL:url];
  [request setHTTPMethod:@"POST"];
  [request setValue:postLength forHTTPHeaderField:@"Content-Length"];
  [request setValue:@"application/json" forHTTPHeaderField:@"Accept"];
  [request setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
  [request setHTTPBody:postData];
  
  
  NSError *error = nil;
  NSHTTPURLResponse *response = nil;
  NSData *urlData=[NSURLConnection sendSynchronousRequest:request returningResponse:&amp;response error:&amp;error];
  </code></pre>
  
  <p>Why I see timeout? and it is only on device?</p>