Added the definition of the "request(endpoint: )" function to the Client public protocol.

This commit is contained in:
Javier Cicchelli 2023-04-16 20:35:36 +02:00
parent 72d59acb08
commit 65c1477d62

View File

@ -6,6 +6,8 @@
// Copyright © 2023 Röck+Cöde. All rights reserved. // Copyright © 2023 Röck+Cöde. All rights reserved.
// //
import Foundation
/// This protocol defines a client that will be making the remote calls. /// This protocol defines a client that will be making the remote calls.
public protocol Client { public protocol Client {
@ -21,4 +23,9 @@ public protocol Client {
as model: Model.Type as model: Model.Type
) async throws -> Model ) async throws -> Model
/// Makes a request to a remote location based on a given endpoint and expects to return an original, uncasted response.
/// - Parameter endpoint: The endpoint for which to make a remote call.
/// - Returns: An original data response from a call to a remote endpoint.
@discardableResult func request(endpoint: some Endpoint) async throws -> Data
} }