Response Headers : WebClient : Network C# Examples


C# Examples » Network » WebClient »

 

Response Headers









    
using  System;
using  System.Collections.Specialized;
using  System.Net;

class  MainClass
{
      public  static  void  Main(string[]  argv)
      {
            WebClient  wc  =  new  WebClient();

            byte[]  response  =  wc.DownloadData("http://www.jva2s.com");
            WebHeaderCollection  whc  =  wc.ResponseHeaders;
            Console.WriteLine("header  count  =  {0}",  whc.Count);
            for  (int  i  =  0;  i  <  whc.Count;  i++)
            {
                  Console.WriteLine(whc.GetKey(i)  +  "  =  "  +  whc.Get(i));
            }
      }
}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Network
» WebClient