Exemplo n.º 1
0
 public static CrossDictionary <string, string> CreateIgnoreCase()
 {
     return(new CrossDictionary <string, string>(
                DictionaryTools.CreateIgnoreCase <string>(),
                DictionaryTools.CreateIgnoreCase <string>()
                ));
 }
Exemplo n.º 2
0
        public void Send(byte[] body, string method)
        {
            Hwr.Method = method;

            if (body != null)
            {
                using (Stream w = Hwr.GetRequestStream())
                {
                    w.Write(body, 0, body.Length);
                }
            }
            WebResponse res = Hwr.GetResponse();

            ResHeaders = DictionaryTools.CreateIgnoreCase <string>();

            foreach (string name in res.Headers.Keys)
            {
                ResHeaders.Add(name, res.Headers[name]);
            }

            using (Stream r = res.GetResponseStream())
            {
                ResBody = FileTools.ReadToEnd(r, this.ResBodySizeMax);
            }
        }