<Type Name="WebResponse" FullName="System.Net.WebResponse" FullNameSP="System_Net_WebResponse" Maintainer="ecma">
  <TypeSignature Language="ILASM" Value=".class public abstract serializable WebResponse extends System.MarshalByRefObject implements System.IDisposable" />
  <TypeSignature Language="C#" Value="public abstract class WebResponse : MarshalByRefObject, IDisposable" />
  <MemberOfLibrary>Networking</MemberOfLibrary>
  <AssemblyInfo>
    <AssemblyName>System</AssemblyName>
    <AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ]</AssemblyPublicKey>
    <AssemblyVersion>1.0.x.x</AssemblyVersion>
    <AssemblyCulture>none</AssemblyCulture>
    <Attributes>
      <Attribute>
        <AttributeName>CLSCompliantAttribute(true)</AttributeName>
        <Excluded>0</Excluded>
      </Attribute>
    </Attributes>
  </AssemblyInfo>
  <ThreadingSafetyStatement>All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.</ThreadingSafetyStatement>
  <Docs>
    <summary>
      <para>Represents a response received from a Uniform Resource Identifier
      (URI).</para>
    </summary>
    <remarks>
      <para>
        <see cref="T:System.Net.WebResponse" /> is the base
   class from which protocol-specific response classes, such as <see cref="T:System.Net.HttpWebResponse" />
   , are derived.</para>
      <para>Classes that derive from <see cref="T:System.Net.WebResponse" /> are required to
override the following members in the <see cref="T:System.Net.WebResponse" /> class: </para>
      <list type="bullet">
        <item>
          <term>
            <see cref="P:System.Net.WebResponse.ContentLength" />: Gets or sets the content length of 
      the data being received.</term>
        </item>
        <item>
          <term>
            <see cref="P:System.Net.WebResponse.ContentType" />: Gets or sets the media type of the 
      data being received.</term>
        </item>
        <item>
          <term>
            <see cref="M:System.Net.WebResponse.GetResponseStream" />: Returns a
   <see cref="T:System.IO.Stream" /> that contains data from 
      the current host.</term>
        </item>
        <item>
          <term>
            <see cref="P:System.Net.WebResponse.ResponseUri" />: Gets a <see cref="T:System.Uri" /> containing the URI of the resource associated with the 
      current instance.</term>
        </item>
        <item>
          <term>
            <see cref="P:System.Net.WebResponse.Headers" />:
      Gets or sets the collection of header name/value pairs associated with the
      current instance.</term>
        </item>
      </list>
      <block subset="none" type="note">
        <para> Applications can participate in request/response transactions in a
      protocol-agnostic manner using instances of the <see cref="T:System.Net.WebResponse" /> class while
      protocol-specific classes derived from <see cref="T:System.Net.WebResponse" />
      
      carry
      out the details of the
      request.</para>
        <para> Applications do not create <see cref="T:System.Net.WebResponse" />
objects directly; they are created by calling <see cref="M:System.Net.WebRequest.GetResponse" />
.</para>
      </block>
    </remarks>
    <example>
      <para>The following example creates a <see cref="T:System.Net.WebResponse" />
instance from a <see cref="T:System.Net.WebRequest" />
.</para>
      <code lang="C#">using System;
using System.Net;

public class WebResponseExample {

  public static void Main() {

    // Initialize the WebRequest.
    WebRequest myRequest =
      WebRequest.Create("http://www.contoso.com");

    // Return the response. 
    WebResponse myResponse = myRequest.GetResponse();

    // Code to use the WebResponse goes here.

    // Close the response to free resources.
    myResponse.Close();
  }
}
</code>
    </example>
  </Docs>
  <Base>
    <BaseTypeName>System.MarshalByRefObject</BaseTypeName>
  </Base>
  <Interfaces>
    <Interface>
      <InterfaceName>System.IDisposable</InterfaceName>
      <Excluded>0</Excluded>
    </Interface>
  </Interfaces>
  <Members>
    <Member MemberName="GetResponseStream">
      <MemberSignature Language="ILASM" Value=".method public hidebysig virtual class System.IO.Stream GetResponseStream()" />
      <MemberSignature Language="C#" Value="public virtual Stream GetResponseStream();" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.IO.Stream</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>
          <para>Returns a <see cref="T:System.IO.Stream" /> that contains data from the current host.</para>
        </summary>
        <returns>
          <para> A <see cref="T:System.IO.Stream" /> for reading data from the
   current
   host.</para>
        </returns>
        <exception cref="T:System.NotSupportedException">This method is not implemented in the derived class. </exception>
        <remarks>
          <para>
            <block subset="none" type="behaviors">This method is
      required to return a <see cref="T:System.IO.Stream" /> from the host specified by the <see cref="P:System.Net.WebResponse.ResponseUri" /> property of the current instance.</block>
          </para>
          <para>
            <block subset="none" type="default">This method throws <see cref="T:System.NotSupportedException" />.</block>
          </para>
          <para>
            <block subset="none" type="overrides">This
   method is required to be overridden by classes that inherit from
<see cref="T:System.Net.WebResponse" />.</block>
          </para>
          <para>
            <block subset="none" type="usage">Use this method to open a connection to the current host. To close the stream when it
   is no longer needed, in order to prevent the exhaustion of system resources, invoke
   either the <see cref="M:System.IO.Stream.Close" qualify="true" /> or <see cref="M:System.Net.WebResponse.Close" />
   methods.</block>
          </para>
        </remarks>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="System.IDisposable.Dispose">
      <MemberSignature Language="ILASM" Value=".method private final hidebysig virtual void System.IDisposable.Dispose()" />
      <MemberSignature Language="C#" Value="void IDisposable.Dispose();" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>Implemented to support the <see cref="T:System.IDisposable" /> interface. [Note: For more information, see <see cref="M:System.IDisposable.Dispose" />.]</summary>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="Close">
      <MemberSignature Language="ILASM" Value=".method public hidebysig virtual void Close()" />
      <MemberSignature Language="C#" Value="public virtual void Close();" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>
          <para> Closes the response stream.</para>
        </summary>
        <exception cref="T:System.NotSupportedException">This method is not implemented in the derived class.</exception>
        <remarks>
          <para>
            <block subset="none" type="behaviors">This method is
      required to free the connection used by the <see cref="T:System.IO.Stream" /> returned by a call to <see cref="M:System.Net.WebResponse.GetResponseStream" /> .</block>
          </para>
          <para>
            <block subset="none" type="default">The <see cref="T:System.Net.WebResponse" /> class is 
   abstract and does not provide an implementation for this method. This method
   throws <see cref="T:System.NotSupportedException" />.</block>
          </para>
          <para>
            <block subset="none" type="overrides">This method is
   required to be overridden in derived classes to close the response stream and
   free resources allocated by the current instance.</block>
          </para>
          <para>
            <block subset="none" type="usage">Use this method or
<see cref="M:System.IO.Stream.Close" qualify="true" /> to
   clean up the resources used by a <see cref="T:System.Net.WebResponse" /> .</block>
          </para>
        </remarks>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName=".ctor">
      <MemberSignature Language="ILASM" Value="family rtspecialname specialname instance void .ctor()" />
      <MemberSignature Language="C#" Value="protected WebResponse();" />
      <MemberType>Constructor</MemberType>
      <ReturnValue />
      <Parameters />
      <Docs>
        <summary>
          <para>Constructs a new
      instance of the <see cref="T:System.Net.WebResponse" />
      class.</para>
        </summary>
        <remarks>
          <para>This constructor is called only by classes that derive from <see cref="T:System.Net.WebResponse" />.</para>
          <para>
            <block subset="none" type="note">To obtain a <see cref="T:System.Net.WebResponse" /> instance, use the <see cref="M:System.Net.WebRequest.GetResponse" /> method; do not use this
constructor.</block>
          </para>
        </remarks>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="ContentLength">
      <MemberSignature Language="ILASM" Value=".property int64 ContentLength { public hidebysig virtual specialname int64 get_ContentLength() public hidebysig virtual specialname void set_ContentLength(int64 value) }" />
      <MemberSignature Language="C#" Value="public virtual long ContentLength { get; set; }" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>System.Int64</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>
          <para>Gets or sets the content length of the data received from the server.</para>
        </summary>
        <value>
          <para>A <see cref="T:System.Int64" />
containing the number of bytes returned from the resource.</para>
        </value>
        <exception cref="T:System.NotSupportedException">This property is not implemented in the derived class. </exception>
        <remarks>
          <para>
            <block subset="none" type="behaviors">This
      property contains the number of bytes of data in the response to the
      request associated with the current instance. For request methods that contain
      header information, the <see cref="P:System.Net.WebResponse.ContentLength" /> does not include
      the length of the header information. The value of this property is
      set by the Content-Length header received in the
      response.</block>
          </para>
          <para>
            <block subset="none" type="default">The <see cref="T:System.Net.WebResponse" /> class 
   is abstract and does not provide an implementation for this property. This property throws <see cref="T:System.NotSupportedException" />.</block>
          </para>
          <para>
            <block subset="none" type="overrides">This
   property is required to be overridden by classes that inherit from
<see cref="T:System.Net.WebResponse" /> to set the content length as appropriate for the 
   derived class. </block>
          </para>
          <para>
            <block subset="none" type="usage">Use this property to determine the number of bytes in the response.</block>
          </para>
        </remarks>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="ContentType">
      <MemberSignature Language="ILASM" Value=".property string ContentType { public hidebysig virtual specialname string get_ContentType() public hidebysig virtual specialname void set_ContentType(string value) }" />
      <MemberSignature Language="C#" Value="public virtual string ContentType { get; set; }" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>System.String</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>
          <para> Gets or sets the media type of the data received.</para>
        </summary>
        <value>
          <para>A <see cref="T:System.String" /> that
   contains the media type of the response data.</para>
        </value>
        <exception cref="T:System.NotSupportedException">This property is not implemented in the derived class. </exception>
        <remarks>
          <para>
            <block subset="none" type="note">The media type is typically the MIME encoding of
      the content.</block>
          </para>
          <para>
            <block subset="none" type="behaviors">As described above.</block>
          </para>
          <para>
            <block subset="none" type="default">The <see cref="T:System.Net.WebResponse" /> class is abstract and 
   does not provide an implementation for this property. This property throws
<see cref="T:System.NotSupportedException" />.</block>
          </para>
          <para>
            <block subset="none" type="overrides">This property is required to be overridden by classes that inherit from
<see cref="T:System.Net.WebResponse" />.</block>
          </para>
          <para>
            <block subset="none" type="usage">Use this
   property to get the media type of the response.</block>
          </para>
        </remarks>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="ResponseUri">
      <MemberSignature Language="ILASM" Value=".property class System.Uri ResponseUri { public hidebysig virtual specialname class System.Uri get_ResponseUri() }" />
      <MemberSignature Language="C#" Value="public virtual Uri ResponseUri { get; }" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>System.Uri</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>
          <para>Gets the URI 
      of the resource associated with the current instance.</para>
        </summary>
        <value>
          <para>A <see cref="T:System.Uri" /> containing the URI 
   of the resource associated with the current response.</para>
        </value>
        <exception cref="T:System.NotSupportedException">This property is not implemented in the derived class. </exception>
        <remarks>
          <block subset="none" type="behaviors">
            <para>This property is read-only.</para>
            <para>This property returns the URI that provided the response 
         information in the current instance. <block subset="none" type="note">If the
         method protocol used in the associated <see cref="T:System.Net.WebRequest" /> permits redirection, the value of this property
         might differ from the <see cref="P:System.Net.WebRequest.RequestUri" /> property of the request.</block></para>
          </block>
          <para>
            <block subset="none" type="default">The <see cref="T:System.Net.WebResponse" /> class is 
   abstract and does not provide an implementation for this property. This property
   throws <see cref="T:System.NotSupportedException" />
   .</block>
          </para>
          <para>
            <block subset="none" type="overrides">This property
   is required to be overridden by classes that inherit from <see cref="T:System.Net.WebResponse" />.</block>
          </para>
          <para>
            <block subset="none" type="usage">Use this property
   to determine the URI that originated the response.</block>
          </para>
        </remarks>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="Headers">
      <MemberSignature Language="ILASM" Value=".property class System.Net.WebHeaderCollection Headers { public hidebysig virtual specialname class System.Net.WebHeaderCollection get_Headers() }" />
      <MemberSignature Language="C#" Value="public virtual WebHeaderCollection Headers { get; }" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>System.Net.WebHeaderCollection</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>
          <para> Gets the collection of header name/value pairs associated with the current
      instance.</para>
        </summary>
        <value>
          <para>A <see cref="T:System.Net.WebHeaderCollection" /> containing the header name/value pairs associated
   with the current instance.</para>
        </value>
        <exception cref="T:System.NotSupportedException">This property is not implemented in the derived class. </exception>
        <remarks>
          <para>This property contains a <see cref="T:System.Net.WebHeaderCollection" /> instance containing the
   header information returned in the response from the resource. </para>
          <para>
            <block subset="none" type="behaviors">This property is read-only.</block>
          </para>
          <para>
            <block subset="none" type="default">The <see cref="T:System.Net.WebResponse" /> class is
abstract and does not provide an implementation for this property. This property
throws <see cref="T:System.NotSupportedException" />.</block>
          </para>
          <para>
            <block subset="none" type="overrides">This property
   is required to be overridden by classes that inherit from <see cref="T:System.Net.WebResponse" />.</block>
          </para>
          <para>
            <block subset="none" type="usage">Use this property
   to retrieve the header information received with the response.</block>
          </para>
        </remarks>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
  <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="protected WebResponse(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext)" />
      <MemberType>Constructor</MemberType>
      <Parameters>
        <Parameter Name="serializationInfo" Type="System.Runtime.Serialization.SerializationInfo" />
        <Parameter Name="streamingContext" Type="System.Runtime.Serialization.StreamingContext" />
      </Parameters>
      <Docs>
        <summary>To be added.</summary>
        <param name="serializationInfo">To be added.</param>
        <param name="streamingContext">To be added.</param>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
  </Members>
  <TypeExcluded>0</TypeExcluded>
</Type>
