Beispiel #1
0
        public void Core_HeaderTests_NVCAdd()
        {
            var nvc = new NameValueCollection();

            nvc["Content-Type"] = "text/html; charset=UTF-8";
            nvc["Referer"]      = "http://quotes.toscrape.com/";

            var hdr = new HeaderCollection();

            hdr.AddItems(nvc);
            testHeader(hdr);
        }
Beispiel #2
0
        public void Core_HeaderTests_KVPAdd()
        {
            var kvp = new KeyValuePair <string, string>[]
            {
                new KeyValuePair <string, string>("Content-Type", "text/html; charset=UTF-8"),
                new KeyValuePair <string, string>("Referer", "http://quotes.toscrape.com/"),
            };

            var hdr = new HeaderCollection();

            hdr.AddItems(kvp);
            testHeader(hdr);
        }