                 headers: HTTPHeaders,
                 body:[UInt8]
             ) {
-                if url != requestURL {
-                    logError("URL in response does not match URL in ping request: \(url) != \(requestURL)")
+                if url != pingURL {
+                    logError("URL in response does not match URL in ping request: \(url) != \(pingURL)")
                     return
                 }
 

    }


    func ping() {
        if !_connected {
            let requestURL = "\(self.url)ping/"

            var headers = HTTPHeaders()
            headers.add(name: "Accept", value: "application/json")

            let request = HTTPRequest(
                url: requestURL,
                method: HTTPMethod.GET,
                headers: headers,
                body: []

                logInfo("Successfully connected to IMS Server: \(self.url)")
                _connected = true
            }

            func onError(message: String) {
                logError("Error while attempting ping request: \(message)")
                _connected = false
            }

            logInfo("Attempting ping request to: \(pingURL)")
            self.httpSession.send(
                request: request,
                responseHandler: onResponse,
                errorHandler: onError
            )
        }
    }
    private var _connected: Bool = false


    func reload() -> Failable {
        connect()



