Suggestion for reducing code duplication in RestNetworker.swift