diff --git a/LeStorage/Services.swift b/LeStorage/Services.swift index 8066d67..73a7fd0 100644 --- a/LeStorage/Services.swift +++ b/LeStorage/Services.swift @@ -55,6 +55,15 @@ public class Services { // MARK: - Base + /// Runs a request on the API and returns the appropriate response + /// - Parameters: + /// - path: the path of the service in the api, ie. "create-users/" + /// - method: the HTTP method to call + /// - requiresToken: whether the token must be included in the request + public func run(path: String, method: HTTPMethod, requiresToken: Bool) async throws -> U { + return try await self._runRequest(serviceCall: ServiceCall(path: path, method: method, requiresToken: requiresToken)) + } + /// Runs a request using a configuration object /// - Parameters: /// - serviceConf: A instance of ServiceConf