title: How can I use Foundation's URLRequest type on Linux?
body: <p>When I try to use the struct <a href="https://developer.apple.com/documentation/foundation/urlrequest" rel="noreferrer">URLRequest from Foundation</a>, I get an error when compiling with swift 5.1.1. The same code works fine with swift 5.0.1.</p>
  
  <p>Example: given file Foo.swift with content</p>
  
  <pre><code>import Foundation
  print(URLRequest.self)
  </code></pre>
  
  <p>With Swift 5.0.1 we get</p>
  
  <pre><code>$ docker run --rm -v "$PWD:/app" swift:5.0.1 sh -c \
       'swiftc /app/Foo.swift &amp;&amp; ./Foo'
  URLRequest
  </code></pre>
  
  <p>But with 5.1.1</p>
  
  <pre><code>$ docker run --rm -v "$PWD:/app" swift:5.1.1 sh -c \
       'swiftc /app/Foo.swift &amp;&amp; ./Foo
  Foo.swift:2:7: error: use of unresolved identifier 'URLRequest'
  print(URLRequest.self)
        ^~~~~~~~~~
  </code></pre>
  
  <p>I can't seem to find anything mentioning relevant changes to Foundation, and the source code at <a href="https://github.com/apple/swift-corelibs-foundation" rel="noreferrer">https://github.com/apple/swift-corelibs-foundation</a> looks stable, too.</p>
  
  <p>What's going on here, and is there a workaround for this?</p>