public void InsertRequest(string SendedData, string ReceivedData)
        {
            if (SendedData.Length == 0 || ReceivedData.Length == 0)
                return;
            if (!SendedData.ToLower().Contains("get") && !SendedData.ToLower().Contains("post") && !SendedData.ToLower().Contains("put"))
                return;

            string SendData = SendedData.Replace("\0", "");
            string RecData = ReceivedData.Replace("\0", "");
            //if(SendData == null

            ProxyRequest proxyRequest = new ProxyRequest();

            int GetIndex = SendedData.IndexOf("GET ");
            string URL = SendData.Substring(GetIndex + 4);
            URL = URL.Substring(0, URL.IndexOf(' '));

            proxyRequest.URL = URL;
            proxyRequest.POST = "";
            int DataIndex = RecData.IndexOf("\r\n\r\n");
            if (DataIndex != -1)
            {
                if (DataIndex + 4 < RecData.Length)
                    proxyRequest.Data = RecData.Substring(DataIndex + 4);
                if (DataIndex < RecData.Length)
                    proxyRequest.ResponseHeaders = RecData.Substring(0, DataIndex);
            }
            proxyRequest.RequestHeaders = SendData;
            proxyRequest.RequestTime = DateTime.Now;
            Requests.Add(proxyRequest);
        }
 public void InsertRequest(string URL, string Data, string POST, WebHeaderCollection RequestHeaders, WebHeaderCollection ResponseHeaders)
 {
     ProxyRequest proxyRequest = new ProxyRequest();
     proxyRequest.URL = URL;
     proxyRequest.POST = POST;
     proxyRequest.Data = Data;
     //proxyRequest.RequestHeaders = RequestHeaders;
     //proxyRequest.ResponseHeaders = ResponseHeaders;
     proxyRequest.RequestTime = DateTime.Now;
     Requests.Add(proxyRequest);
 }
        public void InsertRequest(string URL, string Data, string POST, WebHeaderCollection RequestHeaders, WebHeaderCollection ResponseHeaders)
        {
            ProxyRequest proxyRequest = new ProxyRequest();

            proxyRequest.URL  = URL;
            proxyRequest.POST = POST;
            proxyRequest.Data = Data;
            //proxyRequest.RequestHeaders = RequestHeaders;
            //proxyRequest.ResponseHeaders = ResponseHeaders;
            proxyRequest.RequestTime = DateTime.Now;
            Requests.Add(proxyRequest);
        }
        public void InsertRequest(string SendedData, string ReceivedData)
        {
            if (SendedData.Length == 0 || ReceivedData.Length == 0)
            {
                return;
            }
            if (!SendedData.ToLower().Contains("get") && !SendedData.ToLower().Contains("post") && !SendedData.ToLower().Contains("put"))
            {
                return;
            }

            string SendData = SendedData.Replace("\0", "");
            string RecData  = ReceivedData.Replace("\0", "");
            //if(SendData == null

            ProxyRequest proxyRequest = new ProxyRequest();

            int    GetIndex = SendedData.IndexOf("GET ");
            string URL      = SendData.Substring(GetIndex + 4);

            URL = URL.Substring(0, URL.IndexOf(' '));

            proxyRequest.URL  = URL;
            proxyRequest.POST = "";
            int DataIndex = RecData.IndexOf("\r\n\r\n");

            if (DataIndex != -1)
            {
                if (DataIndex + 4 < RecData.Length)
                {
                    proxyRequest.Data = RecData.Substring(DataIndex + 4);
                }
                if (DataIndex < RecData.Length)
                {
                    proxyRequest.ResponseHeaders = RecData.Substring(0, DataIndex);
                }
            }
            proxyRequest.RequestHeaders = SendData;
            proxyRequest.RequestTime    = DateTime.Now;
            Requests.Add(proxyRequest);
        }