title: swift 3.1 reading CSV or PLIST file from web
body: <p>I'd like to use readStringFromURL method to obtain a file from a plist and then use it on insertDataInArrayFromPlist in order to display it or put it on CoreData, substituting    <code>let path = Bundle.main.path(forResource: plistFileName, ofType: plistFileExtension)</code>. </p>
  
  <p>the ISSUE  the try statement gives me this ERROR </p>
  
  <pre><code>Argument labels '(contentsOfURL:, usedEncoding:)' do not match any available overloads
  </code></pre>
  
  <p>in my viewDidLoad:</p>
  
  <pre><code>let obtainedfile = readStringFromURL(stringURL: kremoteSamplePlist)
  print(obtainedfile ?? "nothing to print")
  </code></pre>
  
  <p>I retrive the file from web</p>
  
  <pre><code>   func readStringFromURL(stringURL:String)-&gt; String!{
          if let url = NSURL(string: stringURL) {
              do {
                  return try String(contentsOfURL: url, usedEncoding: nil)
              } catch {
                  print("Cannot load contents")
                  return nil
              }
          } else {
              print("String was not a URL")
              return nil
          }
      }
  </code></pre>
  
  <p>then I put the data in a struct</p>
  
  <pre><code>func insertDataInArrayFromPlist(arrayOfEntities: inout [product]) {
  
      let path = Bundle.main.path(forResource: plistFileName, ofType: plistFileExtension)
      let localArray = NSArray(contentsOfFile: path!)!
      for dict in localArray {
          var futureEntity = product()
          let bdict = dict as! [String: AnyObject]
          futureEntity.name = bdict["Name"] as? String
          futureEntity.ProductId = bdict["Product Id"] as? String
          arrayOfEntities.append(futureEntity)
      }
  
      for element in arrayOfEntities {
          print("name is \(element.name!), the id is \(element.ProductId!)")
      }
  
  }
  </code></pre>