Defined the Client protocol.
This commit is contained in:
parent
a894a9de47
commit
777a50367c
14
Libraries/Sources/APIService/Protocols/Client.swift
Normal file
14
Libraries/Sources/APIService/Protocols/Client.swift
Normal 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
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user