---
title: "What is NSURLConnection class in iOS?"  
description: "What is NSURLConnection class in iOS?"  
author: "Sunil Singh"  
published: 2017-01-10  
updated: 2020-09-22  
canonical: https://www.mindstick.com/interview/23163/what-is-nsurlconnection-class-in-ios  
category: "ios"  
tags: ["iphone", "ios", "iphone sdk", "xcode"]  
reading_time: 1 minute  

---

# What is NSURLConnection class in iOS?

NSURLConnection objects allow you to load the contents of a url by providing a URL request object.There are two ways of use of NSURLConnection class one is asynchronous and second is synchronous . In asynchronous connection request create a new thread and performs it download process on new thread so that it not block the main thread .In synchronous connection run on main thread while downloading content and doing its communication .

## Answers

### Answer by Sunil Singh

NSURLConnection objects allow you to load the contents of a url by providing a URL request object.There are two ways of use of NSURLConnection class one is asynchronous and second is synchronous . In asynchronous connection request create a new thread and performs it download process on new thread so that it not block the main thread .In synchronous connection run on main thread while downloading content and doing its communication .


---

Original Source: https://www.mindstick.com/interview/23163/what-is-nsurlconnection-class-in-ios

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
