title: IOS / Swift2 - List all files in remote directory
body: <p>I have a server running nginx. I have a directory in my server where I have several audio files. I replaced my real url by "url".</p>
  
  <p>How can I list all files in that directory in a table.</p>
  
  <p>When I print weContent I get: </p>
  
  <p><strong>403 Forbidden</strong></p>
  
  <pre><code>override func viewDidLoad() {
      super.viewDidLoad()
      let url = NSURL(string: "url")!
      //self.webView.loadRequest(NSURLRequest(URL: url))
  
      let task = NSURLSession.sharedSession().dataTaskWithURL(url) { (data, response, error) -&gt; Void in
  
          // Will happen when task completes
          if let urlContent = data {
              let webContent = NSString(data: urlContent, encoding: NSUTF8StringEncoding)
              print(webContent)
              dispatch_async(dispatch_get_main_queue(), { () -&gt; Void in
                  self.webView.loadHTMLString(String(webContent!), baseURL: nil)
              })
          } else {
              // Show error message
          }
      }
      task.resume()
  }
  </code></pre>
  
  <p>Thank you</p>