<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Networking In iOS]]></title><description><![CDATA[This blog teaches you how to make requests in swift. It helps you to deal with rest api]]></description><link>https://fetch-data-using-urlsession-in-ios.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Fri, 18 Sep 2026 23:25:46 GMT</lastBuildDate><atom:link href="https://fetch-data-using-urlsession-in-ios.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Fetch Data Using URLSession In swift (iOS)]]></title><description><![CDATA[Before diving into making requests and mapping data to models first lets understand what is the URLSession?

It’s Swift’s built-in API to make network requests (like fetching data from the internet).
]]></description><link>https://fetch-data-using-urlsession-in-ios.hashnode.dev/fetch-data-using-urlsession-in-swift-ios</link><guid isPermaLink="true">https://fetch-data-using-urlsession-in-ios.hashnode.dev/fetch-data-using-urlsession-in-swift-ios</guid><dc:creator><![CDATA[Sandesh Pawar]]></dc:creator><pubDate>Wed, 09 Sep 2026 05:39:46 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/9e9PD9blAto/upload/275e632cf029ea35b0f37b87ca3243b3.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>Before diving into making requests and mapping data to models first lets understand what is the URLSession?</h2>
<ul>
<li><p>It’s Swift’s built-in API to <strong>make network requests</strong> (like fetching data from the internet).</p>
</li>
<li><p>You use it to download JSON, images, or send data to a server.</p>
</li>
<li><p>Think of it as your app’s “internet worker.”</p>
</li>
</ul>
<h2>Simple Mental Model to understand the flow of URLSession.</h2>
<ol>
<li><p>Create a URL - (The address you want to get the data as response)</p>
</li>
<li><p>Create a URLSession Task with - (we will create dataTask as we are hitting the url)</p>
</li>
<li><p>Handle the response (success or error) in a completion handler.</p>
</li>
</ol>
]]></content:encoded></item></channel></rss>