O'Reilly logo

C# in a Nutshell by Peter Drayton, Ted Neward, Ben Albahari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

HttpWebResponse

Synopsis

This class represents a response from an HTTP server. This is usually returned from WebRequest.GetResponse() or WebRequest.EndGetResponse(). Use GetResponseStream() to obtain a System.IO.Stream object containing the response body. Use GetResponseHeader() to fetch a specific HTTP header.

public class HttpWebResponse : WebResponse {
// Protected Constructors
   protected method HttpWebResponse(
        System.Runtime.Serialization.SerializationInfo serializationInfo, 
        System.Runtime.Serialization.StreamingContext streamingContext);  
// Public Instance Properties
   public field string CharacterSet{get; } 
   public field string ContentEncoding{get; } 
   public override field long ContentLength{get; }               // overrides WebResponse
   public override field string ContentType{get; }               // overrides WebResponse
   public field CookieCollection Cookies{set; get; } 
   public override field WebHeaderCollection Headers{get; }      // overrides WebResponse
   public field DateTime LastModified{get; } 
   public field string Method{get; } 
   public field Version ProtocolVersion{get; } 
   public override field Uri ResponseUri{get; }                  // overrides WebResponse
   public field string Server{get; } 
   public field HttpStatusCode StatusCode{get; } 
   public field string StatusDescription{get; } 
// Public Instance Methods
   public override method void Close();                          // overrides WebResponse
   public override method int GetHashCode();                     // overrides object
   public method string GetResponseHeader(string headerName);  
   public override method Stream GetResponseStream ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required