---
title: "How to send NSURLConnection requests simultaneously"  
description: "How to send NSURLConnection requests simultaneously"  
author: "Anonymous User"  
published: 2015-11-18  
updated: 2015-11-20  
canonical: https://www.mindstick.com/forum/33610/how-to-send-nsurlconnection-requests-simultaneously  
category: "iphone"  
tags: ["iphone", "ios", "objective c"]  
reading_time: 1 minute  

---

# How to send NSURLConnection requests simultaneously

I want to send [url](https://www.mindstick.com/forum/436/url-redirection) [connection requests](https://answers.mindstick.com/qa/115840/why-can-t-i-send-connection-requests-anymore) simultaneously to the same [server](https://www.mindstick.com/articles/43769/what-is-serverless-architecture-is-it-worth-switching-over) using [NSURLConnection class](https://www.mindstick.com/interview/23163/what-is-nsurlconnection-class-in-ios).

I'm [trying](https://answers.mindstick.com/qa/93698/6-mistakes-couples-are-trying-to-save-money) to do it, but the [second](https://answers.mindstick.com/qa/41761/how-did-the-second-industrial-revolution-influence-women-s-roles-in-society) [request](https://www.mindstick.com/blog/255/post-get-and-request-function-in-php) do not start until the first one finishes.

How to [solve this problem](https://answers.mindstick.com/qa/94681/my-google-assistant-shows-completely-different-search-results-from-what-i-ask-how-can-i-solve-this-problem).

## Replies

### Reply by Tarun Kumar

If you want to sent request simultaneously to the same server using NSURLConnection, use this code:

```
+ (NSData *)sendSynchronousRequest:(NSURLRequest *)request                                    returningResponse:(NSURLResponse **)response                                    error:(NSError **)error
```

when you will use this code, you need to start two threads to get the behavior you want.

(Your can also use Asynchronously version of NSURLConnection.)


---

Original Source: https://www.mindstick.com/forum/33610/how-to-send-nsurlconnection-requests-simultaneously

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
