 				return
 			}
 
-			networkIndicationStart()
+			#if os(iOS)
+				networkIndicationStart()
+			#endif
+
 			let authToken = fromServer.authToken
-			let apiPath = fromServer.apiPath ?? ""
-
-			let o = NSBlockOperation {
-
-				var expandedPath = startsWith(path, "/") ? apiPath.stringByAppendingPathComponent(path) : path
-
-				if let params = parameters {
-					var pairs = [String]()
-					for (key, value) in params {
-						pairs.append(key + "=" + value)
-					}
-					expandedPath = expandedPath + "?" + "&".join(pairs)
-				}
-
-				let r = NSMutableURLRequest(URL: NSURL(string: expandedPath)!, cachePolicy: NSURLRequestCachePolicy.UseProtocolCachePolicy, timeoutInterval: NETWORK_TIMEOUT)
-				r.setValue(self.userAgent(), forHTTPHeaderField: "User-Agent")
-				r.setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")
-				if authToken != nil { r.setValue("token " + authToken!, forHTTPHeaderField: "Authorization") }
-
-				if let headers = extraHeaders {
-					for (key,value) in headers {
-						DLog("(%@) custom header: %@=%@", apiServerLabel, key, value)
-						r.setValue(value, forHTTPHeaderField:key)
-					}
-				}
-
-				////////////////////////// preempt with error backoff algorithm
-				let fullUrlPath = r.URL!.absoluteString!
-				var existingBackOff = self.badLinks[fullUrlPath]
-				if existingBackOff != nil {
-					if NSDate().compare(existingBackOff!.nextAttemptAt) == NSComparisonResult.OrderedAscending {
-						// report failure and return
-						DLog("(%@) preempted fetch to previously broken link %@, won't actually access this URL until %@", apiServerLabel, fullUrlPath, existingBackOff!.nextAttemptAt)
-						if let fail = failure {
-							let error = NSError(domain: "Preempted fetch because of throttling", code: 400, userInfo: nil)
-							dispatch_async(dispatch_get_main_queue(), {
-								fail(response: nil, data: nil, error: error)
-							});
-						}
-						self.networkIndicationEnd()
-						return
-					}
-				}
-
-				#if DEBUG
-					let startTime = NSDate()
-				#endif
-
-				var error: NSError?
-				var res: NSURLResponse?
-				let data = NSURLConnection.sendSynchronousRequest(r, returningResponse: &res, error: &error)
+			var expandedPath = startsWith(path, "/") ? (fromServer.apiPath ?? "").stringByAppendingPathComponent(path) : path
+
+			if let params = parameters {
+				var pairs = [String]()
+				for (key, value) in params {
+					pairs.append(key + "=" + value)
+				}
+				expandedPath = expandedPath + "?" + "&".join(pairs)
+			}
+
+			let r = NSMutableURLRequest(URL: NSURL(string: expandedPath)!, cachePolicy: NSURLRequestCachePolicy.UseProtocolCachePolicy, timeoutInterval: NETWORK_TIMEOUT)
+			r.setValue(userAgent(), forHTTPHeaderField: "User-Agent")
+			r.setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")
+			if authToken != nil { r.setValue("token " + authToken!, forHTTPHeaderField: "Authorization") }
+
+			if let headers = extraHeaders {
+				for (key,value) in headers {
+					DLog("(%@) custom header: %@=%@", apiServerLabel, key, value)
+					r.setValue(value, forHTTPHeaderField:key)
+				}
+			}
+
+			////////////////////////// preempt with error backoff algorithm
+			let fullUrlPath = r.URL!.absoluteString!
+			var existingBackOff = self.badLinks[fullUrlPath]
+			if existingBackOff != nil {
+				if NSDate().compare(existingBackOff!.nextAttemptAt) == NSComparisonResult.OrderedAscending {
+					// report failure and return
+					DLog("(%@) preempted fetch to previously broken link %@, won't actually access this URL until %@", apiServerLabel, fullUrlPath, existingBackOff!.nextAttemptAt)
+					if let fail = failure {
+						let error = NSError(domain: "Preempted fetch because of throttling", code: 400, userInfo: nil)
+						dispatch_async(dispatch_get_main_queue(), {
+							fail(response: nil, data: nil, error: error)
+						});
+					}
+					#if os(iOS)
+						networkIndicationEnd()
+					#endif
+					return
+				}
+			}
+
+			urlSession.dataTaskWithRequest(r) { (data, res, e) in
+
 				let response = res as? NSHTTPURLResponse
-
-				#if DEBUG
-					let networkTime = NSDate().timeIntervalSinceDate(startTime)
-				#endif
-
 				var parsedData: AnyObject?
 				if data?.length > 0 {
 					parsedData = NSJSONSerialization.JSONObjectWithData(data!, options: NSJSONReadingOptions.allZeros, error:nil)
 				}
-
+				var error = e
 				if error == nil && response?.statusCode > 299 {
 					error = NSError(domain: "Error response received", code:response!.statusCode, userInfo:nil)
 					if(response?.statusCode >= 400) {

	// warning: now calls back on thread!!
	func getImage(url: NSURL,
		success:((response: NSHTTPURLResponse?, data: NSData?)->Void)?,
		failure:((response: NSHTTPURLResponse?, error: NSError?)->Void)?) -> NSBlockOperation {

			dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (Int64)(0.1 * Double(NSEC_PER_SEC))), dispatch_get_main_queue()) {
				self.networkIndicationStart()
			}

			let o = NSBlockOperation {

				let r = NSMutableURLRequest(URL: url, cachePolicy: NSURLRequestCachePolicy.UseProtocolCachePolicy, timeoutInterval: NETWORK_TIMEOUT)
				r.setValue(self.userAgent(), forHTTPHeaderField: "User-Agent")

				var error: NSError?
				var res: NSURLResponse?
				let data = NSURLConnection.sendSynchronousRequest(r, returningResponse: &res, error: &error)
				let response = res as? NSHTTPURLResponse
				if error == nil && response?.statusCode>299 {
					error = NSError(domain: "Error response received", code: response!.statusCode, userInfo: nil)
				}

					}
				}

				#if os(iOS)
					self.networkIndicationEnd()
				#endif
			}.resume()
	}

	private func userAgent() -> String {
