title: NSURLErrorDomain code =-1001 request getting timed out
body: <p>I am developing an iOS app that should send the data collected by sensors to a server. However I am only able to send the data for 1 min after that I get a following error:</p>
  
  <pre><code>submit error = Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={NSUnderlyingError=0x1469a9820 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 "The request timed out." UserInfo={NSErrorFailingURLStringKey=http://xyz/abc/, NSErrorFailingURLKey=http://xyz/abc/, _kCFStreamErrorCodeKey=-2102, _kCFStreamErrorDomainKey=4, NSLocalizedDescription=The request timed out.}}, NSErrorFailingURLStringKey=http://xyz/abc/, NSErrorFailingURLKey=http://xyz/abc/, _kCFStreamErrorDomainKey=4, _kCFStreamErrorCodeKey=-2102, NSLocalizedDescription=The request timed out.}
  </code></pre>
  
  <p>Here is the code snippet that tries to send the data:</p>
  
  <pre><code>-(void)postData:(NSString*)postTo withParameters:(NSDictionary*)parameters withHeaders:(NSDictionary*)headers{
      [[UNIRest post:^(UNISimpleRequest *request) {
          [request setUrl:[NSString stringWithFormat:@"%@%@", BASE_URL, postTo]];
          [request setHeaders:headers];
          [request setParameters:parameters];
      }] asJsonAsync:^(UNIHTTPJsonResponse* response, NSError *error) {
          if (error) {
              NSLog(@"submit error = %@", error);
              return;
          }
          else
          {
              NSLog(@"submit to %@ success", [NSString stringWithFormat:@"%@%@/", BASE_URL, postTo]);
          }
      }];
  }
  NSDictionary* headers = @{@"accept": @"application/json"};
  for (int i = 0; i &lt; sensorDataLength; i++) {
          SensorData *Obj = [SensorArray objectAtIndex:i];
          NSDictionary* parameters = @{@"x": [NSString stringWithFormat:@"%f", Obj.xAxis], @"y": [NSString stringWithFormat:@"%f", Obj.yAxis]};
  
          [self postData:@"abc/" withParameters:parameters withHeaders:headers];
      }
  </code></pre>
  
  <p>How can I increase the timeout interval of 60 secs?
  Any help would be very appreciated. </p>