public async Task <T> SendRequestAsync <T>(RPCRequest request) { var rpcRequestJson = JsonConvert.SerializeObject(request.Parameters, JsonSerializerSettings); var response = await UnityCoroutineHandler.ExecuteCoroutineOnMainThread(SendRequest <RPCResponse>(_url + request.Route, rpcRequestJson)); return(response.GetData <T>()); }
protected override async Task <RpcResponseMessage> SendAsync(RpcRequestMessage request, string route = null) { var rpcRequestJson = JsonConvert.SerializeObject(request, JsonSerializerSettings); return(await UnityCoroutineHandler.ExecuteCoroutineOnMainThread(SendRequest <RpcResponseMessage>(_url, rpcRequestJson))); }