 
 // MARK: - API service class
 
-public final class APIService<Resource: APIResource> {
+public final class NetworkingService<Resource: NetworkingResource> {
 
     /// Load API resource and convert json response into a dictionary model `T`
-    public func load<T>(resource: Resource, parser: @escaping (JSON) -> T?, completion: @escaping (Result<T>) -> Void) {
-        guard let url = URL(string: resource.path, relativeTo: resource.url) else { return }
+    public func load<T>(resource: Resource, parser: @escaping (Data) -> T?, completion: @escaping (Result<T>) -> Void) {
+        guard let url = URL(string: resource.path, relativeTo: resource.host) else { return }
         var urlRequest = URLRequest(url: url, cachePolicy: .reloadIgnoringLocalAndRemoteCacheData, timeoutInterval: 10)
         urlRequest.allHTTPHeaderFields = resource.headers
         urlRequest.httpMethod = resource.method.rawValue

            }

            DispatchQueue.main.async{ completion(.success(result)) }

            #if DEBUG
                print("\(response)\n\(try? JSONSerialization.jsonObject(with: data, options: []))")
            #endif
            }.resume()
    }
}

// MARK: - Error type


            guard
                let data = data,
                let result: T = parser(data) else {
                if (200...299).contains((response as! HTTPURLResponse).statusCode) {
                    DispatchQueue.main.async{ completion(.success(nil)) }
                } else {
