title: Convert URLRequest to NSMutableURLRequest
body: <p>I'm trying to convert a <code>URLRequest</code> to a <code>NSMutableURLRequest</code> in Swift 3.0 but I can't get it to work. This is the code I have:</p>
  
  <pre><code>var request = self.request
  URLProtocol.setProperty(true, forKey: "", in: request)
  </code></pre>
  
  <p>But it says </p>
  
  <blockquote>
    <p>cannot convert type URLRequest to type NSMutableURLRequest.</p>
  </blockquote>
  
  <p>When I try to cast using 'as' it just says the cast will always fail. What do I do?</p>