title: How to prevent URLComponents().port from adding a question mark before the query (Swift/Xcode)
body: <p>I am trying to compose a representative <code>URLComponents()</code> in the app I am designing.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>class ViewController: UIViewController {
  
  override func viewDidLoad() {
      super.viewDidLoad()
  
      var components = URLComponents()
  
      components.scheme = "http"
      components.host = "0.0.0.0"
      components.port = 9090
      let queryItemToken = URLQueryItem(name: "/predict?text", value: "what's your name?")
      components.queryItems = [queryItemToken]
  
      print(components.url as Any)
      }
  }
  </code></pre>
  
  <p>Here is the output of the above snippet:</p>
  
  <pre><code>Optional(http://0.0.0.0:9090?/predict?text=what's%20your%20name?)
  </code></pre>
  
  <p>The above output doesn't work on the server because of the ? between the port and the query!
  How can I prevent <code>URLComponents()</code> from inserting this redundant ? between the port and the query!</p>
  
  <p>The target output: <code>Optional(http://0.0.0.0:9090/predict?text=what's%20your%20name?)</code></p>