Defined the Client protocol.

This commit is contained in:
Javier Cicchelli 2022-12-04 15:16:31 +01:00
parent a894a9de47
commit 777a50367c

View File

@ -0,0 +1,14 @@
//
// Client.swift
// APIService
//
// Created by Javier Cicchelli on 04/12/2022.
// Copyright © 2022 Röck+Cöde. All rights reserved.
//
import Foundation
protocol Client {
func request<Model: Decodable>(endpoint: some Endpoint, model: Model.Type) async throws -> Model
@discardableResult func request(endpoint: some Endpoint) async throws -> Data
}