title: Swift: REST JSON Get Request With Authentication
body: <p>I'm fairly new to Swift and also very new to JSON and REST. I'm try to validate the credentials passed by the user and validate that the credentials are valid then print some of the JSON data to the screen. Everything I find online about this seems to involve simple a json api url with an api key without any credentials.</p>
  
  <p>Basically I've got a url like this: <a href="https://ipaddresshere/yii_entry.php/rest/info" rel="nofollow">https://ipaddresshere/yii_entry.php/rest/info</a>
  And I will be user a username such as: Bob and a password such as: examplePass.</p>
  
  <p>If someone could show me an example in swift of how to get data with authentication or point me in the right direction that would be great. Thanks!</p>