Example #1
0
            public void Send(TSend obj)
            {
                var xhr = new XMLHttpRequest();

                xhr.Open("POST", this.url);
                xhr.OnReadyStateChange = () => {
                    if (xhr.ReadyState == XMLHttpRequestReadyState.Done)
                    {
                        var data = xhr.RecvJson <TRecv>();
                        this.onRecv(data);
                    }
                };
                xhr.SendJson(obj);
            }