             RGNetwork.hideIndicator()
         }
     }
+
+}
+
+
+// MARK: - URL Path Handle
+
+extension RGNetwork {
 
     private static func urlPathString(by urlString: String) throws -> String {
         if urlString.rg_hasHttpPrefix {

    private static func responseString(
        with request: DataRequest,
        success: @escaping SuccessTask,
        failure: @escaping FailTask
    ) {
        request.responseString { (responseString) in
            print("RGNetwork request debugDescription: \n", responseString.debugDescription, separator: "")

            let httpStatusCode = responseString.response?.statusCode
            guard let string = responseString.value else {
                failure(responseString.error, httpStatusCode, request, .string(responseString))
                RGNetwork.hideIndicator()
                return
            }

            success(nil, string, responseString.data, httpStatusCode, request, .string(responseString))
            RGNetwork.hideIndicator()
        }
    }

}


// MARK: - Response of DataRequest / UploadRequest

extension RGNetwork {

    private static func responseJSON(
        with request: DataRequest,
        success: @escaping SuccessTask,
        failure: @escaping FailureTask
    ) {
        request.responseJSON { (responseJSON) in
            print("RGNetwork.request.debugDescription: \n\(responseJSON.debugDescription)")

            let httpStatusCode = responseJSON.response?.statusCode
            var responseData = Data()
            if let data = responseJSON.data {
                responseData = data
            }
            let string = String(data: responseData, encoding: .utf8)
            guard let code = httpStatusCode, code >= 200 && code < 300 else {
                failure(responseJSON.error, string, responseJSON.data, httpStatusCode, request, .json(responseJSON))
                RGNetwork.hideIndicator()
                return
            }

            guard let json = responseJSON.value as? ResponseJSON else {
                success(nil, string, responseJSON.data, httpStatusCode, request, .json(responseJSON))
                RGNetwork.hideIndicator()
                return
            }

            success(json, string, responseJSON.data, httpStatusCode, request, .json(responseJSON))
            RGNetwork.hideIndicator()
        }
    }
