Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 460 Bytes

File metadata and controls

18 lines (14 loc) · 460 Bytes

NetworkLayer

Generic network library for service model protocol, handling networking commons errors.

public typealias Headers = [String: String]

public protocol NetworkService {
    var baseURL: URL { get }
    var path: String { get }
    var method: HTTPMethod { get }
    var task: HTTPTask { get }
    var headers: Headers? { get }
}

Built with URLSession and Codable.

Tested with Quick, Nimble and Dependency Injection of test doubles.