Verified Commit 5d2a544e authored by Eyad Hasan's avatar Eyad Hasan

working on adding a global variable to be used when checking for no network. ...

working on adding a global variable to be used when checking for no network.  Going to modify our download code so the network check is done outside of that file
parent b9444a1c
......@@ -20,6 +20,8 @@ enum Day: Int {
// Add functions here later if we need them
}
class Facility: Object, MapContext, Mappable {
@objc dynamic var slug = ""
@objc dynamic var facilityName = ""
......
......@@ -14,7 +14,7 @@ public class Reachability {
var status:Bool = false
let url = NSURL(string: "https://google.com")
let url = NSURL(string: "https://api.srct.gmu.edu/whatsopen/v2/facilities/?format=json")
let request = NSMutableURLRequest(url: url! as URL)
request.httpMethod = "HEAD"
request.cachePolicy = NSURLRequest.CachePolicy.reloadIgnoringLocalAndRemoteCacheData
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment