 
         log("<<<<<<<<<< JSON Response <<<<<<<<<<")
         log("Time Elapsed: \(elapsed)")
-        if let url = request?.url {
+        if let url = httpResponse?.url {
             log("Url: \(url.absoluteString)")
             log("PATH: \(url.path)")
             let apiTripObject = APITripTimeObject(path: url.path, tripTime: elapsed)


open class JSONRequest {

    fileprivate(set) var request: NSMutableURLRequest?

    open static var log: ((String) -> Void)?
    open static var userAgent: String?
    open static var requestTimeout = 5.0
    open static var resourceTimeout = 10.0
    open static var requestCachePolicy: NSURLRequest.CachePolicy = .useProtocolCachePolicy

    open static let serviceTripTimeNotification = NSNotification.Name("JSON_REQUEST_TRIP_TIME_NOTIFICATION")

    open var httpRequest: NSMutableURLRequest? {
        return request
    }

    /* Used for dependency injection of outside URLSessions (keep nil to use default) */
    private var urlSession: URLSession?

                                                body: self.body(fromData: data))
                complete(result)
                return
            } else if let httpResponse = (response as? HTTPURLResponse),
                httpResponse.statusCode == 304,
                let cachedResponseObj = cachedResponse {
                /*  For some rediculous reason, there are cases where the cache contains a response for the HTTP request (as verified
                 by the conditional check above), but that cached response isn't passed transparently to us as a 200OK response, and is
                 instead a 304, which throws the consumer out of wack since there's no guarantee they have cached the data themselves.

                 So, if we got a 304, AND we have a cached response object, let's parse & process that instead here. Yay for caching >:-(
                 */
                print("Unexpected 304 returned when a cached value exists. Parsing & returning cached response")
                self.traceResponse(elapsed: elapsed, responseData: cachedResponseObj.data,
                                   httpResponse: cachedResponseObj.response as? HTTPURLResponse,
                                   error: error as NSError?)
                let result = self.parse(data: cachedResponseObj.data, response: cachedResponseObj.response)
                complete(result)
            } else {
                let result = self.parse(data: data, response: response)
                complete(result)
            }
        }
        trace(task: task)
        task.resume()
    }

    func networkSession(forcedTimeout: TimeInterval? = nil) -> URLSession {
        let config = JSONRequest.sessionConfig
        if let timeout = forcedTimeout {
            config.timeoutIntervalForRequest = timeout
            config.timeoutIntervalForResource = timeout
        }
        let session = URLSession(configuration: config)
        if forcedTimeout == nil {
            // if there isn't a custom timeout, set the member variable with this new session we've created for future use.
            urlSession = session
        }
        return session
    }

    func submitSyncRequest(method: JSONRequestHttpVerb, url: String,
