Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Foundation
- protocol APIEndpoint {
- func endpoint() -> String
- }
- class APIRequest {
- struct ErrorResponse: Codable {
- let status: String
- let code: Int
- let message: String
- }
- enum APIError: Error {
- case invalidEndpoint
- case errorResponseDetected
- case noData
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement