<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>URL on Mike Gopsill</title>
    <link>https://www.mikegopsill.com/categories/url/</link>
    <description>Recent content in URL on Mike Gopsill</description>
    <generator>Hugo -- 0.164.0</generator>
    <language>en</language>
    <lastBuildDate>Tue, 06 May 2025 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://www.mikegopsill.com/categories/url/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>How to build URLs in Swift</title>
      <link>https://www.mikegopsill.com/posts/how-to-build-urls-in-swift/</link>
      <pubDate>Tue, 06 May 2025 00:00:00 +0000</pubDate>
      <guid>https://www.mikegopsill.com/posts/how-to-build-urls-in-swift/</guid>
      <description>&lt;p&gt;Building URLs safely and expressively is a common requirement in Swift applications—especially when dealing with REST APIs. In this post, we’ll explore four elegant approaches to construct URLs in Swift: manual string interpolation, Foundation’s &lt;code&gt;URLComponents&lt;/code&gt;, a custom URL‐builder DSL, and an enum‐driven router. By the end, you’ll have a clear sense of trade‐offs and patterns you can adopt in your own codebase.&lt;/p&gt;
&lt;h2 id=&#34;manual-string-interpolation&#34;&gt;Manual String Interpolation&lt;/h2&gt;
&lt;p&gt;The simplest approach is to build the URL by concatenating strings:&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
