Exemple #1
0
        protected override void OnTextFrame(string text)
        {
            string html = string.Empty;
            string url  = $"http://localhost:58850/api/des/{text}/decrypt";

            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);

            request.AutomaticDecompression = DecompressionMethods.GZip;

            using (HttpWebResponse httpresponse = (HttpWebResponse)request.GetResponse())
                using (Stream stream = httpresponse.GetResponseStream())
                    using (StreamReader reader = new StreamReader(stream))
                    {
                        html = reader.ReadToEnd();
                    }

            string response = "Responce ServerABC: " + html;

            base.Send(response);
            _logger.Chat(response);
        }