         request.addValue("application/json", forHTTPHeaderField: "Accept")
         
         UIApplication.shared().isNetworkActivityIndicatorVisible = true
-
+        
         URLSession.shared.dataTask(with: request, completionHandler: completionHandler).resume()
-        
-        UIApplication.shared().isNetworkActivityIndicatorVisible = false
-
+        // disabled in callback when executed
     }
     
     class func post(_ url: String, body: String) {

    class func get(_ url: String, callback: ((AnyObject) -> Void)) {
        basicRequest(url, method: "GET", body: "") { (data, response, error) in
            do {
                if let json = data {
                    let parsed = try JSONSerialization.jsonObject(with: json, options: JSONSerialization.ReadingOptions.allowFragments)
                    callback(parsed)

//
//  JSONClient.swift
//  Purchases
//
//  Created by Michael Tremel on 6/15/15.
