Thanks for the answer, but finally the solution
class HttpRequest<Request, Response>
{
private var serviceBase:String = "http://192.168.1.1/api";
func request(path:String, model: Request, success: @escaping((_ response: [Response]?) -> ()), failure: @escaping ((_ error:String) -> ()) {
// code here..
}
}
source
share