title: Basic authentication with JSON
body: <p>The JSON page I'm requesting requires a password and username both of type string. The Username and password belong to the developer... By the way it is able to reach the page I just can't get past the authentication. </p>
  
  <p>This is the api url: <a href="https://api.intrinio.com/prices?identifier=AAPL" rel="nofollow noreferrer">https://api.intrinio.com/prices?identifier=AAPL</a></p>
  
  <p>If I've left out some information or code let me know and I'll provide it.</p>
  
  <pre><code>class ViewController: UIViewController, UITextFieldDelegate, UITableViewDelegate, UITableViewDataSource {
  
      //MARK: - Outlets
      @IBOutlet weak var labelTwo: UILabel!
      @IBOutlet weak var tableView: UITableView!
      @IBOutlet weak var tickerTextField: UITextField!
  
      //MARK: - Properties
      let userPasswordString = ""
      let userPassword = ""
  
      //MARK: - View Did Load
      override func viewDidLoad() {
          tickerTextField.textColor = UIColor.lightGray
          tickerTextField.text = "Search Ticker"
          tickerTextField.delegate = self
  
          let jsonUrlString = "https://api.intrinio.com/prices?identifier=\(ticker)"
          print(jsonUrlString)
          guard let url = URL(string: jsonUrlString) else { return }
          URLSession.shared.dataTask(with: url) { (data, response, err) in
              let dataAsString = String(data: data!, encoding: .utf8)
              print(dataAsString!)
              guard let data = data else { return }
              do {
                  let jsonDecoder = JSONDecoder()
                  let tickerPrice = try jsonDecoder.decode(TickerPrice.self, from: data)
                  DispatchQueue.main.async {
                     print(tickerPrice.name)
                  }
              } catch let jsonErr {
                  print("Error serielaising jason", jsonErr)
              }
              }.resume()
  
      }
  </code></pre>