 
     func parse(data: Data?, response: URLResponse?) -> JSONResult {
         guard let httpResponse = response as? HTTPURLResponse else {
-            return JSONResult.Failure(error: JSONError.NonHTTPResponse, response: nil, body: nil)
+            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)
+            return JSONResult.success(data: nil, response: httpResponse)
         }
         guard let json = JSONToObject(data: data) else {
-            return JSONResult.Failure(error: JSONError.ResponseDeserialization,
+            return JSONResult.failure(error: JSONError.responseDeserialization,
                                       response: httpResponse,
                                       body: dataToUTFString(data: data))
         }
-        return JSONResult.Success(data: json, response: httpResponse)
+        return JSONResult.success(data: json, response: httpResponse)
     }
 
     func body(fromData data: Data?) -> String? {

                           headers: JSONObject? = nil) -> JSONResult {

        let semaphore = DispatchSemaphore(value: 0)
        var requestResult: JSONResult = JSONResult.Failure(error: JSONError.UnknownError,
                                                           response: nil, body: nil)
        submitAsyncRequest(method: method, url: url, queryParams: queryParams,
                           payload: payload, headers: headers) { result in


    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
        }
    }
