Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
1411 lines (1278 sloc) 82.6 KB
<Type Name="HttpWebResponse" FullName="System.Net.HttpWebResponse">
<TypeSignature Language="C#" Value="public class HttpWebResponse : System.Net.WebResponse, IDisposable, System.Runtime.Serialization.ISerializable" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi serializable beforefieldinit HttpWebResponse extends System.Net.WebResponse implements class System.IDisposable, class System.Runtime.Serialization.ISerializable" />
<TypeSignature Language="DocId" Value="T:System.Net.HttpWebResponse" />
<TypeSignature Language="VB.NET" Value="Public Class HttpWebResponse&#xA;Inherits WebResponse&#xA;Implements IDisposable, ISerializable" />
<TypeSignature Language="C++ CLI" Value="public ref class HttpWebResponse : System::Net::WebResponse, IDisposable, System::Runtime::Serialization::ISerializable" />
<TypeSignature Language="F#" Value="type HttpWebResponse = class&#xA; inherit WebResponse&#xA; interface ISerializable&#xA; interface IDisposable" />
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Net.WebResponse</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.IDisposable</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Runtime.Serialization.ISerializable</InterfaceName>
</Interface>
</Interfaces>
<Attributes>
<Attribute FrameworkAlternate="netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0">
<AttributeName>System.Serializable</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Provides an HTTP-specific implementation of the <see cref="T:System.Net.WebResponse" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This class contains support for HTTP-specific uses of the properties and methods of the <xref:System.Net.WebResponse> class. The <xref:System.Net.HttpWebResponse> class is used to build HTTP stand-alone client applications that send HTTP requests and receive HTTP responses.
> [!NOTE]
> Do not confuse <xref:System.Net.HttpWebResponse> with the <xref:System.Web.HttpResponse> class that is used in ASP.NET applications and whose methods and properties are exposed through ASP.NET's intrinsic `Response` object.
You should never directly create an instance of the <xref:System.Net.HttpWebResponse> class. Instead, use the instance returned by a call to <xref:System.Net.HttpWebRequest.GetResponse%2A?displayProperty=nameWithType>. You must call either the <xref:System.IO.Stream.Close%2A?displayProperty=nameWithType> or the <xref:System.Net.HttpWebResponse.Close%2A?displayProperty=nameWithType> method to close the response and release the connection for reuse. It is not necessary to call both <xref:System.IO.Stream.Close%2A?displayProperty=nameWithType> and <xref:System.Net.HttpWebResponse.Close%2A?displayProperty=nameWithType>, but doing so does not cause an error.
Common header information returned from the Internet resource is exposed as properties of the class. See the following table for a complete list. Other headers can be read from the <xref:System.Net.HttpWebResponse.Headers%2A> property as name/value pairs.
The following table shows the common HTTP headers that are available through properties of the <xref:System.Net.HttpWebResponse> class.
|Header|Property|
|------------|--------------|
|Content-Encoding|<xref:System.Net.HttpWebResponse.ContentEncoding%2A>|
|Content-Length|<xref:System.Net.HttpWebResponse.ContentLength%2A>|
|Content-Type|<xref:System.Net.HttpWebResponse.ContentType%2A>|
|Last-Modified|<xref:System.Net.HttpWebResponse.LastModified%2A>|
|Server|<xref:System.Net.HttpWebResponse.Server%2A>|
The contents of the response from the Internet resource are returned as a <xref:System.IO.Stream> by calling the <xref:System.Net.HttpWebResponse.GetResponseStream%2A> method.
## Examples
The following example returns an <xref:System.Net.HttpWebResponse> from an <xref:System.Net.HttpWebRequest>.
[!code-cpp[Classic HttpWebResponse Example#1](~/samples/snippets/cpp/VS_Snippets_Remoting/Classic HttpWebResponse Example/CPP/source.cpp#1)]
[!code-csharp[Classic HttpWebResponse Example#1](~/samples/snippets/csharp/VS_Snippets_Remoting/Classic HttpWebResponse Example/CS/source.cs#1)]
[!code-vb[Classic HttpWebResponse Example#1](~/samples/snippets/visualbasic/VS_Snippets_Remoting/Classic HttpWebResponse Example/VB/source.vb#1)]
]]></format>
</remarks>
<altmember cref="T:System.Net.WebResponse" />
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Net.HttpWebResponse" /> class.</summary>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public HttpWebResponse ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.HttpWebResponse.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; HttpWebResponse();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName>System.Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)</AttributeName>
</Attribute>
</Attributes>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Net.HttpWebResponse" /> class.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected HttpWebResponse (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor(class System.Runtime.Serialization.SerializationInfo serializationInfo, valuetype System.Runtime.Serialization.StreamingContext streamingContext) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.HttpWebResponse.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; HttpWebResponse(System::Runtime::Serialization::SerializationInfo ^ serializationInfo, System::Runtime::Serialization::StreamingContext streamingContext);" />
<MemberSignature Language="F#" Value="new System.Net.HttpWebResponse : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -&gt; System.Net.HttpWebResponse" Usage="new System.Net.HttpWebResponse (serializationInfo, streamingContext)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0">
<AttributeName>System.Obsolete("Serialization is obsoleted for this type", false)</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netcore-2.0;netcore-2.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netstandard-2.0;netframework-4.8;netcore-2.2">
<AttributeName>System.Obsolete("Serialization is obsoleted for this type. http://go.microsoft.com/fwlink/?linkid=14202")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netcore-3.0">
<AttributeName>System.Obsolete("Serialization is obsoleted for this type. https://go.microsoft.com/fwlink/?linkid=14202")</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="serializationInfo" Type="System.Runtime.Serialization.SerializationInfo" Index="0" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<Parameter Name="streamingContext" Type="System.Runtime.Serialization.StreamingContext" Index="1" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
</Parameters>
<Docs>
<param name="serializationInfo">A <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that contains the information required to serialize the new <see cref="T:System.Net.HttpWebRequest" />.</param>
<param name="streamingContext">A <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains the source of the serialized stream that is associated with the new <see cref="T:System.Net.HttpWebRequest" />.</param>
<summary>Initializes a new instance of the <see cref="T:System.Net.HttpWebResponse" /> class from the specified <see cref="T:System.Runtime.Serialization.SerializationInfo" /> and <see cref="T:System.Runtime.Serialization.StreamingContext" /> instances.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This constructor implements the <xref:System.Runtime.Serialization.ISerializable> interface for the <xref:System.Net.HttpWebRequest> class.
]]></format>
</remarks>
<altmember cref="T:System.Runtime.Serialization.ISerializable" />
</Docs>
</Member>
<Member MemberName="CharacterSet">
<MemberSignature Language="C#" Value="public string CharacterSet { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string CharacterSet" />
<MemberSignature Language="DocId" Value="P:System.Net.HttpWebResponse.CharacterSet" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property CharacterSet As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ CharacterSet { System::String ^ get(); };" />
<MemberSignature Language="F#" Value="member this.CharacterSet : string" Usage="System.Net.HttpWebResponse.CharacterSet" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the character set of the response.</summary>
<value>A string that contains the character set of the response.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Net.HttpWebResponse.CharacterSet%2A> property contains a value that describes the character set of the response. This character set information is taken from the header returned with the response.
## Examples
The following example obtains the character set of the response.
[!code-cpp[HttpWebResponse_ContentEncoding_CharacterSet#1](~/samples/snippets/cpp/VS_Snippets_Remoting/HttpWebResponse_ContentEncoding_CharacterSet/CPP/source.cpp#1)]
[!code-csharp[HttpWebResponse_ContentEncoding_CharacterSet#1](~/samples/snippets/csharp/VS_Snippets_Remoting/HttpWebResponse_ContentEncoding_CharacterSet/CS/source.cs#1)]
[!code-vb[HttpWebResponse_ContentEncoding_CharacterSet#1](~/samples/snippets/visualbasic/VS_Snippets_Remoting/HttpWebResponse_ContentEncoding_CharacterSet/VB/source.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ObjectDisposedException">The current instance has been disposed.</exception>
</Docs>
</Member>
<Member MemberName="Close">
<MemberSignature Language="C#" Value="public override void Close ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void Close() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.HttpWebResponse.Close" />
<MemberSignature Language="VB.NET" Value="Public Overrides Sub Close ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override void Close();" />
<MemberSignature Language="F#" Value="override this.Close : unit -&gt; unit" Usage="httpWebResponse.Close " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Closes the response stream.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Net.HttpWebResponse.Close%2A> method closes the response stream and releases the connection to the resource for reuse by other requests.
You should not access any properties of the <xref:System.Net.HttpWebResponse> object after the call to the `Close` method. On .NET Core, an <xref:System.ObjectDisposedException> is thrown.
You must call either the <xref:System.IO.Stream.Close%2A?displayProperty=nameWithType> or the <xref:System.Net.HttpWebResponse.Close%2A?displayProperty=nameWithType> method to close the stream and release the connection for reuse. It is not necessary to call both <xref:System.IO.Stream.Close%2A?displayProperty=nameWithType> and <xref:System.Net.HttpWebResponse.Close%2A?displayProperty=nameWithType>, but doing so does not cause an error. Failure to close the stream can cause your application to run out of connections.
> [!NOTE]
> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](~/docs/framework/network-programming/network-tracing.md).
## Examples
The following example demonstrates how to close a <xref:System.Net.HttpWebResponse>.
[!code-cpp[HttpWebResponse_Close#1](~/samples/snippets/cpp/VS_Snippets_Remoting/HttpWebResponse_Close/CPP/httpwebresponse_close.cpp#1)]
[!code-csharp[HttpWebResponse_Close#1](~/samples/snippets/csharp/VS_Snippets_Remoting/HttpWebResponse_Close/CS/httpwebresponse_close.cs#1)]
[!code-vb[HttpWebResponse_Close#1](~/samples/snippets/visualbasic/VS_Snippets_Remoting/HttpWebResponse_Close/VB/httpwebresponse_close.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ObjectDisposedException">**.NET Core only:** This <see cref="T:System.Net.HttpWebResponse" /> object has been disposed.</exception>
</Docs>
</Member>
<Member MemberName="ContentEncoding">
<MemberSignature Language="C#" Value="public string ContentEncoding { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string ContentEncoding" />
<MemberSignature Language="DocId" Value="P:System.Net.HttpWebResponse.ContentEncoding" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property ContentEncoding As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ ContentEncoding { System::String ^ get(); };" />
<MemberSignature Language="F#" Value="member this.ContentEncoding : string" Usage="System.Net.HttpWebResponse.ContentEncoding" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the method that is used to encode the body of the response.</summary>
<value>A string that describes the method that is used to encode the body of the response.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Net.HttpWebResponse.ContentEncoding%2A> property contains the value of the Content-Encoding header returned with the response.
## Examples
The following example uses the <xref:System.Net.HttpWebResponse.ContentEncoding%2A> property to obtain the value of the Content-Encoding header returned with the response.
[!code-cpp[HttpWebResponse_ContentEncoding_CharacterSet#1](~/samples/snippets/cpp/VS_Snippets_Remoting/HttpWebResponse_ContentEncoding_CharacterSet/CPP/source.cpp#1)]
[!code-csharp[HttpWebResponse_ContentEncoding_CharacterSet#1](~/samples/snippets/csharp/VS_Snippets_Remoting/HttpWebResponse_ContentEncoding_CharacterSet/CS/source.cs#1)]
[!code-vb[HttpWebResponse_ContentEncoding_CharacterSet#1](~/samples/snippets/visualbasic/VS_Snippets_Remoting/HttpWebResponse_ContentEncoding_CharacterSet/VB/source.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ObjectDisposedException">The current instance has been disposed.</exception>
</Docs>
</Member>
<Member MemberName="ContentLength">
<MemberSignature Language="C#" Value="public override long ContentLength { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance int64 ContentLength" />
<MemberSignature Language="DocId" Value="P:System.Net.HttpWebResponse.ContentLength" />
<MemberSignature Language="VB.NET" Value="Public Overrides ReadOnly Property ContentLength As Long" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property long ContentLength { long get(); };" />
<MemberSignature Language="F#" Value="member this.ContentLength : int64" Usage="System.Net.HttpWebResponse.ContentLength" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int64</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the length of the content returned by the request.</summary>
<value>The number of bytes returned by the request. Content length does not include header information.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Net.HttpWebResponse.ContentLength%2A> property contains the value of the Content-Length header returned with the response. If the Content-Length header is not set in the response, <xref:System.Net.HttpWebResponse.ContentLength%2A> is set to the value -1.
## Examples
The following example displays the value of this property.
[!code-cpp[NCLResponse1#1](~/samples/snippets/cpp/VS_Snippets_Remoting/NCLResponse1/CPP/httpwebrequest1.cpp#1)]
[!code-csharp[NCLResponse1#1](~/samples/snippets/csharp/VS_Snippets_Remoting/NCLResponse1/CS/httpwebrequest1.cs#1)]
[!code-vb[NCLResponse1#1](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NCLResponse1/VB/httpwebrequest1.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ObjectDisposedException">The current instance has been disposed.</exception>
</Docs>
</Member>
<Member MemberName="ContentType">
<MemberSignature Language="C#" Value="public override string ContentType { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string ContentType" />
<MemberSignature Language="DocId" Value="P:System.Net.HttpWebResponse.ContentType" />
<MemberSignature Language="VB.NET" Value="Public Overrides ReadOnly Property ContentType As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::String ^ ContentType { System::String ^ get(); };" />
<MemberSignature Language="F#" Value="member this.ContentType : string" Usage="System.Net.HttpWebResponse.ContentType" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the content type of the response.</summary>
<value>A string that contains the content type of the response.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Net.HttpWebResponse.ContentType%2A> property contains the value of the Content-Type header returned with the response.
## Examples
The following example displays the value of this property.
[!code-cpp[NCLResponse1#1](~/samples/snippets/cpp/VS_Snippets_Remoting/NCLResponse1/CPP/httpwebrequest1.cpp#1)]
[!code-csharp[NCLResponse1#1](~/samples/snippets/csharp/VS_Snippets_Remoting/NCLResponse1/CS/httpwebrequest1.cs#1)]
[!code-vb[NCLResponse1#1](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NCLResponse1/VB/httpwebrequest1.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ObjectDisposedException">The current instance has been disposed.</exception>
</Docs>
</Member>
<Member MemberName="Cookies">
<MemberSignature Language="C#" Value="public virtual System.Net.CookieCollection Cookies { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Net.CookieCollection Cookies" />
<MemberSignature Language="DocId" Value="P:System.Net.HttpWebResponse.Cookies" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property Cookies As CookieCollection" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::Net::CookieCollection ^ Cookies { System::Net::CookieCollection ^ get(); void set(System::Net::CookieCollection ^ value); };" />
<MemberSignature Language="F#" Value="member this.Cookies : System.Net.CookieCollection with get, set" Usage="System.Net.HttpWebResponse.Cookies" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Net.CookieCollection</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets the cookies that are associated with this response.</summary>
<value>A <see cref="T:System.Net.CookieCollection" /> that contains the cookies that are associated with this response.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Net.HttpWebResponse.Cookies%2A> property provides an instance of the <xref:System.Net.CookieCollection> class that holds the cookies associated with this response.
If the <xref:System.Net.HttpWebRequest.CookieContainer%2A> property of the associated <xref:System.Net.HttpWebRequest> is `null`, the <xref:System.Net.HttpWebResponse.Cookies%2A> property will also be `null`. Any cookie information sent by the server will be available in the <xref:System.Net.HttpWebResponse.Headers%2A> property, however.
## Examples
The following example sends a request to a URL and displays the cookies returned in the response.
[!code-cpp[NCLCookies#1](~/samples/snippets/cpp/VS_Snippets_Remoting/NCLCookies/CPP/cookiessnippets.cpp#1)]
[!code-csharp[NCLCookies#1](~/samples/snippets/csharp/VS_Snippets_Remoting/NCLCookies/CS/cookiessnippets.cs#1)]
[!code-vb[NCLCookies#1](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NCLCookies/VB/cookiessnippets.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ObjectDisposedException">The current instance has been disposed.</exception>
<altmember cref="T:System.Net.CookieContainer" />
</Docs>
</Member>
<Member MemberName="Dispose">
<MemberSignature Language="C#" Value="protected override void Dispose (bool disposing);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void Dispose(bool disposing) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.HttpWebResponse.Dispose(System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Protected Overrides Sub Dispose (disposing As Boolean)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override void Dispose(bool disposing);" />
<MemberSignature Language="F#" Value="override this.Dispose : bool -&gt; unit" Usage="httpWebResponse.Dispose disposing" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="disposing" Type="System.Boolean" Index="0" FrameworkAlternate="dotnet-uwp-10.0;netcore-1.0;netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-1.1;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
</Parameters>
<Docs>
<param name="disposing">
<see langword="true" /> to release both managed and unmanaged resources; <see langword="false" /> to releases only unmanaged resources.</param>
<summary>Releases the unmanaged resources used by the <see cref="T:System.Net.HttpWebResponse" />, and optionally disposes of the managed resources.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method is called by the public `Dispose()` method and the <xref:System.Object.Finalize%2A> method. `Dispose()` invokes the protected `Dispose(Boolean)` method with the `disposing` parameter set to `true`. <xref:System.Object.Finalize%2A> invokes `Dispose` with `disposing` set to `false`.
When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this <xref:System.Net.WebResponse> references. This method invokes the `Dispose()` method of each referenced object.
> [!NOTE]
> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](~/docs/framework/network-programming/network-tracing.md).
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>
<see langword="Dispose" /> can be called multiple times by other objects. When overriding <see cref="M:System.Net.HttpWebResponse.Dispose(System.Boolean)" />, be careful not to reference objects that have been previously disposed of in an earlier call to <see langword="Dispose" />. For more information about how to implement <see cref="M:System.Net.HttpWebResponse.Dispose(System.Boolean)" />, see [Implementing a Dispose Method](~/docs/standard/garbage-collection/implementing-dispose.md).
For more information about <see langword="Dispose" /> and <see cref="M:System.Object.Finalize" />, see [Cleaning Up Unmanaged Resources](~/docs/standard/garbage-collection/unmanaged.md) and [Overriding the Finalize Method](https://docs.microsoft.com/previous-versions/dotnet/netframework-4.0/ddae83kx(v=vs.100)).</para>
</block>
</Docs>
</Member>
<Member MemberName="GetHashCode">
<MemberSignature Language="C#" Value="public override int GetHashCode ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance int32 GetHashCode() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.HttpWebResponse.GetHashCode" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function GetHashCode () As Integer" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override int GetHashCode();" />
<MemberSignature Language="F#" Value="override this.GetHashCode : unit -&gt; int" Usage="httpWebResponse.GetHashCode " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns a hash value for a <see cref="T:System.Net.HttpWebResponse" /> instance.</summary>
<returns>An integer hash value.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The GetHashCode method returns a hash code of the web response instance. This value can be used as a key in hash tables.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="GetObjectData">
<MemberSignature Language="C#" Value="protected override void GetObjectData (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void GetObjectData(class System.Runtime.Serialization.SerializationInfo serializationInfo, valuetype System.Runtime.Serialization.StreamingContext streamingContext) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.HttpWebResponse.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; override void GetObjectData(System::Runtime::Serialization::SerializationInfo ^ serializationInfo, System::Runtime::Serialization::StreamingContext streamingContext);" />
<MemberSignature Language="F#" Value="override this.GetObjectData : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -&gt; unit" Usage="httpWebResponse.GetObjectData (serializationInfo, streamingContext)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2">
<AttributeName>System.Obsolete("Serialization is obsoleted for this type. http://go.microsoft.com/fwlink/?linkid=14202")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netcore-3.0">
<AttributeName>System.Obsolete("Serialization is obsoleted for this type. https://go.microsoft.com/fwlink/?linkid=14202")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="serializationInfo" Type="System.Runtime.Serialization.SerializationInfo" Index="0" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<Parameter Name="streamingContext" Type="System.Runtime.Serialization.StreamingContext" Index="1" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
</Parameters>
<Docs>
<param name="serializationInfo">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> to populate with data.</param>
<param name="streamingContext">A <see cref="T:System.Runtime.Serialization.StreamingContext" /> that specifies the destination for this serialization.</param>
<summary>Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with the data needed to serialize the target object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Any objects that are included in the <xref:System.Runtime.Serialization.SerializationInfo> are automatically tracked and serialized by the formatter.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="GetResponseHeader">
<MemberSignature Language="C#" Value="public string GetResponseHeader (string headerName);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance string GetResponseHeader(string headerName) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.HttpWebResponse.GetResponseHeader(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Function GetResponseHeader (headerName As String) As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; System::String ^ GetResponseHeader(System::String ^ headerName);" />
<MemberSignature Language="F#" Value="member this.GetResponseHeader : string -&gt; string" Usage="httpWebResponse.GetResponseHeader headerName" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="headerName" Type="System.String" Index="0" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
</Parameters>
<Docs>
<param name="headerName">The header value to return.</param>
<summary>Gets the contents of a header that was returned with the response.</summary>
<returns>The contents of the specified header.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use <xref:System.Net.HttpWebResponse.GetResponseHeader%2A> to retrieve the contents of particular headers. You must specify which header you want to return.
## Examples
This example creates a Web request and queries for a response. If the site requires authentication, this example will respond with a challenge string. This string is extracted using <xref:System.Net.HttpWebResponse.GetResponseHeader%2A>.
[!code-cpp[HttpWebResponse_GetResponseHeader#1](~/samples/snippets/cpp/VS_Snippets_Remoting/HttpWebResponse_GetResponseHeader/CPP/httpwebresponse_getresponseheader.cpp#1)]
[!code-csharp[HttpWebResponse_GetResponseHeader#1](~/samples/snippets/csharp/VS_Snippets_Remoting/HttpWebResponse_GetResponseHeader/CS/httpwebresponse_getresponseheader.cs#1)]
[!code-vb[HttpWebResponse_GetResponseHeader#1](~/samples/snippets/visualbasic/VS_Snippets_Remoting/HttpWebResponse_GetResponseHeader/VB/httpwebresponse_getresponseheader.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ObjectDisposedException">The current instance has been disposed.</exception>
</Docs>
</Member>
<Member MemberName="GetResponseStream">
<MemberSignature Language="C#" Value="public override System.IO.Stream GetResponseStream ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance class System.IO.Stream GetResponseStream() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.HttpWebResponse.GetResponseStream" />
<MemberSignature Language="VB.NET" Value="Public Overrides Function GetResponseStream () As Stream" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; override System::IO::Stream ^ GetResponseStream();" />
<MemberSignature Language="F#" Value="override this.GetResponseStream : unit -&gt; System.IO.Stream" Usage="httpWebResponse.GetResponseStream " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.IO.Stream</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Gets the stream that is used to read the body of the response from the server.</summary>
<returns>A <see cref="T:System.IO.Stream" /> containing the body of the response.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Net.HttpWebResponse.GetResponseStream%2A> method returns the data stream from the requested Internet resource.
> [!NOTE]
> You must call either the <xref:System.IO.Stream.Close%2A?displayProperty=nameWithType> or the <xref:System.Net.HttpWebResponse.Close%2A?displayProperty=nameWithType> method to close the stream and release the connection for reuse. It is not necessary to call both <xref:System.IO.Stream.Close%2A?displayProperty=nameWithType> and <xref:System.Net.HttpWebResponse.Close%2A?displayProperty=nameWithType>, but doing so does not cause an error. Failure to close the stream will cause your application to run out of connections.
> [!NOTE]
> This member outputs trace information when you enable network tracing in your application. For more information, see [Network Tracing in the .NET Framework](~/docs/framework/network-programming/network-tracing.md).
## Examples
The following example demonstrates how to use <xref:System.Net.HttpWebResponse.GetResponseStream%2A> to return the <xref:System.IO.Stream> instance used to read the response from the server.
[!code-cpp[HttpWebResponse_GetResponseStream#1](~/samples/snippets/cpp/VS_Snippets_Remoting/HttpWebResponse_GetResponseStream/CPP/httpwebresponse_getresponsestream.cpp#1)]
[!code-csharp[HttpWebResponse_GetResponseStream#1](~/samples/snippets/csharp/VS_Snippets_Remoting/HttpWebResponse_GetResponseStream/CS/httpwebresponse_getresponsestream.cs#1)]
[!code-vb[HttpWebResponse_GetResponseStream#1](~/samples/snippets/visualbasic/VS_Snippets_Remoting/HttpWebResponse_GetResponseStream/VB/httpwebresponse_getresponsestream.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.Net.ProtocolViolationException">There is no response stream.</exception>
<exception cref="T:System.ObjectDisposedException">The current instance has been disposed.</exception>
</Docs>
</Member>
<Member MemberName="Headers">
<MemberSignature Language="C#" Value="public override System.Net.WebHeaderCollection Headers { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Net.WebHeaderCollection Headers" />
<MemberSignature Language="DocId" Value="P:System.Net.HttpWebResponse.Headers" />
<MemberSignature Language="VB.NET" Value="Public Overrides ReadOnly Property Headers As WebHeaderCollection" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::Net::WebHeaderCollection ^ Headers { System::Net::WebHeaderCollection ^ get(); };" />
<MemberSignature Language="F#" Value="member this.Headers : System.Net.WebHeaderCollection" Usage="System.Net.HttpWebResponse.Headers" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Net.WebHeaderCollection</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the headers that are associated with this response from the server.</summary>
<value>A <see cref="T:System.Net.WebHeaderCollection" /> that contains the header information returned with the response.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Net.HttpWebResponse.Headers%2A> property is a collection of name/value pairs that contain the HTTP header values returned with the response. Common header information returned from the Internet resource is exposed as properties of the <xref:System.Net.HttpWebResponse> class. The following table lists common headers that the API exposes as properties.
|Header|Property|
|------------|--------------|
|Content-Encoding|<xref:System.Net.HttpWebResponse.ContentEncoding%2A>|
|Content-Length|<xref:System.Net.HttpWebResponse.ContentLength%2A>|
|Content-Type|<xref:System.Net.HttpWebResponse.ContentType%2A>|
|Last-Modified|<xref:System.Net.HttpWebResponse.LastModified%2A>|
|Server|<xref:System.Net.HttpWebResponse.Server%2A>|
## Examples
The following example writes the contents of all of the response headers to the console.
[!code-cpp[HttpWebResponse_Headers#1](~/samples/snippets/cpp/VS_Snippets_Remoting/HttpWebResponse_Headers/CPP/httpwebresponse_headers.cpp#1)]
[!code-csharp[HttpWebResponse_Headers#1](~/samples/snippets/csharp/VS_Snippets_Remoting/HttpWebResponse_Headers/CS/httpwebresponse_headers.cs#1)]
[!code-vb[HttpWebResponse_Headers#1](~/samples/snippets/visualbasic/VS_Snippets_Remoting/HttpWebResponse_Headers/VB/httpwebresponse_headers.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ObjectDisposedException">The current instance has been disposed.</exception>
</Docs>
</Member>
<Member MemberName="IsMutuallyAuthenticated">
<MemberSignature Language="C#" Value="public override bool IsMutuallyAuthenticated { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsMutuallyAuthenticated" />
<MemberSignature Language="DocId" Value="P:System.Net.HttpWebResponse.IsMutuallyAuthenticated" />
<MemberSignature Language="VB.NET" Value="Public Overrides ReadOnly Property IsMutuallyAuthenticated As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property bool IsMutuallyAuthenticated { bool get(); };" />
<MemberSignature Language="F#" Value="member this.IsMutuallyAuthenticated : bool" Usage="System.Net.HttpWebResponse.IsMutuallyAuthenticated" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0">
<AttributeName>System.MonoTODO</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether both client and server were authenticated.</summary>
<value>
<see langword="true" /> if mutual authentication occurred; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You can specify mutual authentication using the <xref:System.Net.WebRequest.AuthenticationLevel%2A> property.
]]></format>
</remarks>
<exception cref="T:System.ObjectDisposedException">The current instance has been disposed.</exception>
</Docs>
</Member>
<Member MemberName="LastModified">
<MemberSignature Language="C#" Value="public DateTime LastModified { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.DateTime LastModified" />
<MemberSignature Language="DocId" Value="P:System.Net.HttpWebResponse.LastModified" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property LastModified As DateTime" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property DateTime LastModified { DateTime get(); };" />
<MemberSignature Language="F#" Value="member this.LastModified : DateTime" Usage="System.Net.HttpWebResponse.LastModified" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.DateTime</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the last date and time that the contents of the response were modified.</summary>
<value>A <see cref="T:System.DateTime" /> that contains the date and time that the contents of the response were modified.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Net.HttpWebResponse.LastModified%2A> property contains the value of the Last-Modified header received with the response. The date and time are assumed to be local time.
## Examples
This example creates an <xref:System.Net.HttpWebRequest> and queries for a response. This example then checks whether the entity requested had been modified any time today.
[!code-cpp[HttpWebResponse_LastModified#1](~/samples/snippets/cpp/VS_Snippets_Remoting/HttpWebResponse_LastModified/CPP/httpwebresponse_lastmodified.cpp#1)]
[!code-csharp[HttpWebResponse_LastModified#1](~/samples/snippets/csharp/VS_Snippets_Remoting/HttpWebResponse_LastModified/CS/httpwebresponse_lastmodified.cs#1)]
[!code-vb[HttpWebResponse_LastModified#1](~/samples/snippets/visualbasic/VS_Snippets_Remoting/HttpWebResponse_LastModified/VB/httpwebresponse_lastmodified.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ObjectDisposedException">The current instance has been disposed.</exception>
</Docs>
</Member>
<Member MemberName="Method">
<MemberSignature Language="C#" Value="public virtual string Method { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string Method" />
<MemberSignature Language="DocId" Value="P:System.Net.HttpWebResponse.Method" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property Method As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::String ^ Method { System::String ^ get(); };" />
<MemberSignature Language="F#" Value="member this.Method : string" Usage="System.Net.HttpWebResponse.Method" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the method that is used to return the response.</summary>
<value>A string that contains the HTTP method that is used to return the response.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<xref:System.Net.HttpWebResponse.Method%2A> returns the method that is used to return the response. Common HTTP methods are GET, HEAD, POST, PUT, and DELETE.
## Examples
The following example checks the string contained in <xref:System.Net.HttpWebResponse.Method%2A>, to determine the Http method invoked by the Web server.
[!code-cpp[HttpWebResponse_Method_Server#1](~/samples/snippets/cpp/VS_Snippets_Remoting/HttpWebResponse_Method_Server/CPP/httpwebresponse_method_server.cpp#1)]
[!code-csharp[HttpWebResponse_Method_Server#1](~/samples/snippets/csharp/VS_Snippets_Remoting/HttpWebResponse_Method_Server/CS/httpwebresponse_method_server.cs#1)]
[!code-vb[HttpWebResponse_Method_Server#1](~/samples/snippets/visualbasic/VS_Snippets_Remoting/HttpWebResponse_Method_Server/VB/httpwebresponse_method_server.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ObjectDisposedException">The current instance has been disposed.</exception>
</Docs>
</Member>
<Member MemberName="ProtocolVersion">
<MemberSignature Language="C#" Value="public Version ProtocolVersion { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Version ProtocolVersion" />
<MemberSignature Language="DocId" Value="P:System.Net.HttpWebResponse.ProtocolVersion" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property ProtocolVersion As Version" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property Version ^ ProtocolVersion { Version ^ get(); };" />
<MemberSignature Language="F#" Value="member this.ProtocolVersion : Version" Usage="System.Net.HttpWebResponse.ProtocolVersion" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Version</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the version of the HTTP protocol that is used in the response.</summary>
<value>A <see cref="T:System.Version" /> that contains the HTTP protocol version of the response.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Net.HttpWebResponse.ProtocolVersion%2A> property contains the HTTP protocol version number of the response sent by the Internet resource.
## Examples
This example creates an <xref:System.Net.HttpWebRequest> and queries for an <xref:System.Net.HttpWebResponse>. The example then checks to see if the server is responding with the same version.
[!code-cpp[HttpWebResponse_ProtocolVersion#1](~/samples/snippets/cpp/VS_Snippets_Remoting/HttpWebResponse_ProtocolVersion/CPP/httpwebresponse_protocolversion.cpp#1)]
[!code-csharp[HttpWebResponse_ProtocolVersion#1](~/samples/snippets/csharp/VS_Snippets_Remoting/HttpWebResponse_ProtocolVersion/CS/httpwebresponse_protocolversion.cs#1)]
[!code-vb[HttpWebResponse_ProtocolVersion#1](~/samples/snippets/visualbasic/VS_Snippets_Remoting/HttpWebResponse_ProtocolVersion/VB/httpwebresponse_protocolversion.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ObjectDisposedException">The current instance has been disposed.</exception>
</Docs>
</Member>
<Member MemberName="ResponseUri">
<MemberSignature Language="C#" Value="public override Uri ResponseUri { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Uri ResponseUri" />
<MemberSignature Language="DocId" Value="P:System.Net.HttpWebResponse.ResponseUri" />
<MemberSignature Language="VB.NET" Value="Public Overrides ReadOnly Property ResponseUri As Uri" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property Uri ^ ResponseUri { Uri ^ get(); };" />
<MemberSignature Language="F#" Value="member this.ResponseUri : Uri" Usage="System.Net.HttpWebResponse.ResponseUri" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Uri</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the URI of the Internet resource that responded to the request.</summary>
<value>The URI of the Internet resource that responded to the request.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Net.HttpWebResponse.ResponseUri%2A> property contains the URI of the Internet resource that actually responded to the request. This URI might not be the same as the originally requested URI, if the original server redirected the request.
The <xref:System.Net.HttpWebResponse.ResponseUri%2A> property will use the Content-Location header if present.
Applications that need to access the last redirected <xref:System.Net.HttpWebResponse.ResponseUri%2A> should use the <xref:System.Net.HttpWebRequest.Address%2A?displayProperty=nameWithType> property rather than <xref:System.Net.HttpWebResponse.ResponseUri%2A>, since the use of <xref:System.Net.HttpWebResponse.ResponseUri%2A> property may open security vulnerabilities.
## Examples
This example creates a <xref:System.Net.HttpWebRequest> and queries for an <xref:System.Net.HttpWebResponse> and then checks to see whether the original URI was redirected by the server.
[!code-cpp[HttpWebResponse_ResponseUri#1](~/samples/snippets/cpp/VS_Snippets_Remoting/HttpWebResponse_ResponseUri/CPP/httpwebresponse_responseuri.cpp#1)]
[!code-csharp[HttpWebResponse_ResponseUri#1](~/samples/snippets/csharp/VS_Snippets_Remoting/HttpWebResponse_ResponseUri/CS/httpwebresponse_responseuri.cs#1)]
[!code-vb[HttpWebResponse_ResponseUri#1](~/samples/snippets/visualbasic/VS_Snippets_Remoting/HttpWebResponse_ResponseUri/VB/httpwebresponse_responseuri.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ObjectDisposedException">The current instance has been disposed.</exception>
</Docs>
</Member>
<Member MemberName="Server">
<MemberSignature Language="C#" Value="public string Server { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string Server" />
<MemberSignature Language="DocId" Value="P:System.Net.HttpWebResponse.Server" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Server As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; property System::String ^ Server { System::String ^ get(); };" />
<MemberSignature Language="F#" Value="member this.Server : string" Usage="System.Net.HttpWebResponse.Server" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the name of the server that sent the response.</summary>
<value>A string that contains the name of the server that sent the response.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Net.HttpWebResponse.Server%2A> property contains the value of the Server header returned with the response.
## Examples
The following example uses the <xref:System.Net.HttpWebResponse.Server%2A> property to display the Web server's name to the console.
[!code-cpp[HttpWebResponse_Method_Server#2](~/samples/snippets/cpp/VS_Snippets_Remoting/HttpWebResponse_Method_Server/CPP/httpwebresponse_method_server.cpp#2)]
[!code-csharp[HttpWebResponse_Method_Server#2](~/samples/snippets/csharp/VS_Snippets_Remoting/HttpWebResponse_Method_Server/CS/httpwebresponse_method_server.cs#2)]
[!code-vb[HttpWebResponse_Method_Server#2](~/samples/snippets/visualbasic/VS_Snippets_Remoting/HttpWebResponse_Method_Server/VB/httpwebresponse_method_server.vb#2)]
]]></format>
</remarks>
<exception cref="T:System.ObjectDisposedException">The current instance has been disposed.</exception>
</Docs>
</Member>
<Member MemberName="StatusCode">
<MemberSignature Language="C#" Value="public virtual System.Net.HttpStatusCode StatusCode { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Net.HttpStatusCode StatusCode" />
<MemberSignature Language="DocId" Value="P:System.Net.HttpWebResponse.StatusCode" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property StatusCode As HttpStatusCode" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::Net::HttpStatusCode StatusCode { System::Net::HttpStatusCode get(); };" />
<MemberSignature Language="F#" Value="member this.StatusCode : System.Net.HttpStatusCode" Usage="System.Net.HttpWebResponse.StatusCode" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Net.HttpStatusCode</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the status of the response.</summary>
<value>One of the <see cref="T:System.Net.HttpStatusCode" /> values.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Net.HttpWebResponse.StatusCode%2A> parameter is a number that indicates the status of the HTTP response. The expected values for status are defined in the <xref:System.Net.HttpStatusCode> class.
## Examples
The following example uses <xref:System.Net.HttpWebResponse.StatusCode%2A> to verify that the status of the <xref:System.Net.HttpWebResponse> is OK.
[!code-cpp[HttpWebResponse_StatusCode_StatusDescription#1](~/samples/snippets/cpp/VS_Snippets_Remoting/HttpWebResponse_StatusCode_StatusDescription/CPP/httpwebresponse_statuscode_statusdescription.cpp#1)]
[!code-csharp[HttpWebResponse_StatusCode_StatusDescription#1](~/samples/snippets/csharp/VS_Snippets_Remoting/HttpWebResponse_StatusCode_StatusDescription/CS/httpwebresponse_statuscode_statusdescription.cs#1)]
[!code-vb[HttpWebResponse_StatusCode_StatusDescription#1](~/samples/snippets/visualbasic/VS_Snippets_Remoting/HttpWebResponse_StatusCode_StatusDescription/VB/httpwebresponse_statuscode_statusdescription.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.ObjectDisposedException">The current instance has been disposed.</exception>
</Docs>
</Member>
<Member MemberName="StatusDescription">
<MemberSignature Language="C#" Value="public virtual string StatusDescription { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string StatusDescription" />
<MemberSignature Language="DocId" Value="P:System.Net.HttpWebResponse.StatusDescription" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property StatusDescription As String" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::String ^ StatusDescription { System::String ^ get(); };" />
<MemberSignature Language="F#" Value="member this.StatusDescription : string" Usage="System.Net.HttpWebResponse.StatusDescription" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the status description returned with the response.</summary>
<value>A string that describes the status of the response.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
A common status message is OK.
## Examples
The following example uses <xref:System.Net.HttpWebResponse.StatusDescription%2A> to verify that the status of the <xref:System.Net.HttpWebResponse> is OK.
[!code-cpp[HttpWebResponse_StatusCode_StatusDescription#2](~/samples/snippets/cpp/VS_Snippets_Remoting/HttpWebResponse_StatusCode_StatusDescription/CPP/httpwebresponse_statuscode_statusdescription.cpp#2)]
[!code-csharp[HttpWebResponse_StatusCode_StatusDescription#2](~/samples/snippets/csharp/VS_Snippets_Remoting/HttpWebResponse_StatusCode_StatusDescription/CS/httpwebresponse_statuscode_statusdescription.cs#2)]
[!code-vb[HttpWebResponse_StatusCode_StatusDescription#2](~/samples/snippets/visualbasic/VS_Snippets_Remoting/HttpWebResponse_StatusCode_StatusDescription/VB/httpwebresponse_statuscode_statusdescription.vb#2)]
]]></format>
</remarks>
<exception cref="T:System.ObjectDisposedException">The current instance has been disposed.</exception>
</Docs>
</Member>
<Member MemberName="SupportsHeaders">
<MemberSignature Language="C#" Value="public override bool SupportsHeaders { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool SupportsHeaders" />
<MemberSignature Language="DocId" Value="P:System.Net.HttpWebResponse.SupportsHeaders" />
<MemberSignature Language="VB.NET" Value="Public Overrides ReadOnly Property SupportsHeaders As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property bool SupportsHeaders { bool get(); };" />
<MemberSignature Language="F#" Value="member this.SupportsHeaders : bool" Usage="System.Net.HttpWebResponse.SupportsHeaders" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value that indicates whether headers are supported.</summary>
<value>
<see langword="true" /> if headers are supported; otherwise, <see langword="false" />. Always returns <see langword="true" />.</value>
<remarks></remarks>
</Docs>
</Member>
<Member MemberName="System.IDisposable.Dispose">
<MemberSignature Language="C#" Value="void IDisposable.Dispose ();" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance void System.IDisposable.Dispose() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.HttpWebResponse.System#IDisposable#Dispose" />
<MemberSignature Language="VB.NET" Value="Sub Dispose () Implements IDisposable.Dispose" />
<MemberSignature Language="C++ CLI" Value=" virtual void System.IDisposable.Dispose() = IDisposable::Dispose;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.IDisposable.Dispose</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Releases all resources used by the <see cref="T:System.Net.HttpWebResponse" />.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Call `Dispose` when you are finished using the <xref:System.Net.HttpWebResponse>. The `Dispose` method leaves the <xref:System.Net.HttpWebResponse> in an unusable state. After calling `Dispose`, you must release all references to the <xref:System.Net.HttpWebResponse> so the garbage collector can reclaim the memory that the <xref:System.Net.HttpWebResponse> was occupying. For more information, see [Cleaning Up Unmanaged Resources](~/docs/standard/garbage-collection/unmanaged.md) and [Implementing a Dispose Method](~/docs/standard/garbage-collection/implementing-dispose.md).
> [!NOTE]
> Always call `Dispose` before you release your last reference to the <xref:System.Net.HttpWebResponse>. Otherwise, the resources it is using will not be freed until the garbage collector calls the <xref:System.Net.HttpWebResponse> object's `Finalize` method.
]]></format>
</remarks>
<forInternalUseOnly />
</Docs>
</Member>
<Member MemberName="System.Runtime.Serialization.ISerializable.GetObjectData">
<MemberSignature Language="C#" Value="void ISerializable.GetObjectData (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);" />
<MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance void System.Runtime.Serialization.ISerializable.GetObjectData(class System.Runtime.Serialization.SerializationInfo serializationInfo, valuetype System.Runtime.Serialization.StreamingContext streamingContext) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.HttpWebResponse.System#Runtime#Serialization#ISerializable#GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)" />
<MemberSignature Language="C++ CLI" Value=" virtual void System.Runtime.Serialization.ISerializable.GetObjectData(System::Runtime::Serialization::SerializationInfo ^ serializationInfo, System::Runtime::Serialization::StreamingContext streamingContext) = System::Runtime::Serialization::ISerializable::GetObjectData;" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>2.0.5.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>netstandard</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2">
<AttributeName>System.Obsolete("Serialization is obsoleted for this type. http://go.microsoft.com/fwlink/?linkid=14202")</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netcore-3.0">
<AttributeName>System.Obsolete("Serialization is obsoleted for this type. https://go.microsoft.com/fwlink/?linkid=14202")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="serializationInfo" Type="System.Runtime.Serialization.SerializationInfo" Index="0" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<Parameter Name="streamingContext" Type="System.Runtime.Serialization.StreamingContext" Index="1" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-1.1;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-2.0;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
</Parameters>
<Docs>
<param name="serializationInfo">The object into which this <see cref="T:System.Net.HttpWebResponse" /> will be serialized.</param>
<param name="streamingContext">The destination of the serialization.</param>
<summary>Serializes this instance into the specified <see cref="T:System.Runtime.Serialization.SerializationInfo" /> object.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.