private IEnumerator GameRequest(UnityWebRequest request, string httpVerb, Action <Game> responseHandler, Action <List <Game> > multipleResponseHandler) { yield return(MakeRequest(request, httpVerb, response => { if (responseHandler != null) { GameRepresentation result = JsonUtility.FromJson <GameRepresentation>(request.downloadHandler.text); responseHandler(result.ToGame()); } if (multipleResponseHandler != null) { List <GameRepresentation> results = new List <GameRepresentation>(JsonHelper.getJsonArray <GameRepresentation>(request.downloadHandler.text)); multipleResponseHandler(results.ConvertAll(game => game.ToGame())); } })); }