                             queryParams: JSONObject? = nil, payload: Any? = nil,
                             headers: JSONObject? = nil, complete: @escaping (JSONResult) -> Void) {
         if isConnectedToNetwork() == false {
-            let error = JSONError.NoInternetConnection
-            complete(.Failure(error: error, response: nil, body: nil))
+            let error = JSONError.noInternetConnection
+            complete(.failure(error: error, response: nil, body: nil))
             return
         }
 


    func parse(data: Data?, response: URLResponse?) -> JSONResult {
        guard let httpResponse = response as? HTTPURLResponse else {
            return JSONResult.Failure(error: JSONError.NonHTTPResponse, response: nil, body: nil)
        }
        guard let data = data, data.count > 0 else {
            return JSONResult.Success(data: nil, response: httpResponse)
        }
        guard let json = JSONToObject(data: data) else {
            return JSONResult.Failure(error: JSONError.ResponseDeserialization,
                                      response: httpResponse,
                                      body: dataToUTFString(data: data))
        }
        return JSONResult.Success(data: json, response: httpResponse)
    }

    func body(fromData data: Data?) -> String? {


    public var httpResponse: HTTPURLResponse? {
        switch self {
        case .success(_, let response):
            return response
        case .failure(_, let response, _):
            return response
        }
    }

    public var error: Error? {
        switch self {
        case .success:
            return nil
        case .failure(let error, _, _):
            return error
        }
    }
