Simple network abstraction written in Swift 3.
See /Example
folder for implementation usage of Proxy, Router and Response initialization.
After implementing you favorite network framework you can create a NetworkManager as simple as:
let networkManager: APIManager = NetworkManager(withProxy: AlamofireProxyImplementation())
For testing a stub of APIProxy can be implemented like: ErrorProxyStub.swift
and swapped out for the live network proxy like so:
let networkManager: APIManager = NetworkManager(withProxy: NetworkManager(withProxy: ErrorProxyStub(withError: NetworkError.server, andStatusCode: 500))
Or even use a IoC container like: Swift IoC Container