Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
956 lines (883 sloc) 66 KB
<Type Name="WebResponse" FullName="System.Net.WebResponse">
<TypeSignature Language="C#" Value="public abstract class WebResponse : MarshalByRefObject, IDisposable, System.Runtime.Serialization.ISerializable" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi abstract serializable beforefieldinit WebResponse extends System.MarshalByRefObject implements class System.IDisposable, class System.Runtime.Serialization.ISerializable" />
<TypeSignature Language="DocId" Value="T:System.Net.WebResponse" />
<TypeSignature Language="VB.NET" Value="Public MustInherit Class WebResponse&#xA;Inherits MarshalByRefObject&#xA;Implements IDisposable, ISerializable" />
<TypeSignature Language="C++ CLI" Value="public ref class WebResponse abstract : MarshalByRefObject, IDisposable, System::Runtime::Serialization::ISerializable" />
<TypeSignature Language="F#" Value="type WebResponse = class&#xA; inherit MarshalByRefObject&#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>
<AssemblyVersion>4.1.2.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>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
<BaseTypeName FrameworkAlternate="netframework-4.5">System.MarshalByRefObject</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 a response from a Uniform Resource Identifier (URI). This is an <see langword="abstract" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Net.WebResponse> class is the `abstract` base class from which protocol-specific response classes are derived. Applications can participate in request and response transactions in a protocol-agnostic manner using instances of the <xref:System.Net.WebResponse> class while protocol-specific classes derived from <xref:System.Net.WebResponse> carry out the details of the request.
Client applications do not create <xref:System.Net.WebResponse> objects directly; they are created by calling the <xref:System.Net.WebRequest.GetResponse%2A> method on a <xref:System.Net.WebRequest> instance.
## Examples
The following example creates a <xref:System.Net.WebResponse> instance from a <xref:System.Net.WebRequest>.
[!code-cpp[Classic WebRequest Example#1](~/samples/snippets/cpp/VS_Snippets_Remoting/Classic WebRequest Example/CPP/source.cpp#1)]
[!code-csharp[Classic WebRequest Example#1](~/samples/snippets/csharp/VS_Snippets_Remoting/Classic WebRequest Example/CS/source.cs#1)]
[!code-vb[Classic WebRequest Example#1](~/samples/snippets/visualbasic/VS_Snippets_Remoting/Classic WebRequest Example/VB/source.vb#1)]
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>When you inherit from <see cref="T:System.Net.WebResponse" />, you must override the following members: <see cref="P:System.Net.WebResponse.ContentLength" />, <see cref="P:System.Net.WebResponse.ContentType" />, <see cref="M:System.Net.WebResponse.GetResponseStream" />, <see cref="P:System.Net.WebResponse.ResponseUri" />, and <see cref="P:System.Net.WebResponse.Headers" />.</para>
</block>
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Net.WebResponse" /> class.</summary>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected WebResponse ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.WebResponse.#ctor" />
<MemberSignature Language="VB.NET" Value="Protected Sub New ()" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; WebResponse();" />
<MemberType>Constructor</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>
<AssemblyVersion>4.1.2.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>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Net.WebResponse" /> class.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Applications do not call the <xref:System.Net.WebResponse> constructor directly; use the <xref:System.Net.WebRequest.GetResponse%2A> method on a <xref:System.Net.WebRequest> instance.
]]></format>
</remarks>
<block subset="none" type="overrides">
<para>This constructor creates and initializes the required fields for descendant classes.</para>
</block>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected WebResponse (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.WebResponse.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; WebResponse(System::Runtime::Serialization::SerializationInfo ^ serializationInfo, System::Runtime::Serialization::StreamingContext streamingContext);" />
<MemberSignature Language="F#" Value="new System.Net.WebResponse : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -&gt; System.Net.WebResponse" Usage="new System.Net.WebResponse (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>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</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;netstandard-2.1;netcore-3.1" />
<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;netstandard-2.1;netcore-3.1" />
</Parameters>
<Docs>
<param name="serializationInfo">An instance of the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> class that contains the information required to serialize the new <see cref="T:System.Net.WebRequest" /> instance.</param>
<param name="streamingContext">An instance of the <see cref="T:System.Runtime.Serialization.StreamingContext" /> class that indicates the source of the serialized stream that is associated with the new <see cref="T:System.Net.WebRequest" /> instance.</param>
<summary>Initializes a new instance of the <see cref="T:System.Net.WebResponse" /> class from the specified instances of the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> and <see cref="T:System.Runtime.Serialization.StreamingContext" /> classes.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
When implemented by a descendant class, this constructor implements the <xref:System.Runtime.Serialization.ISerializable> interface for the <xref:System.Net.WebResponse> descendant.
]]></format>
</remarks>
<exception cref="T:System.NotSupportedException">Any attempt is made to access the constructor, when the constructor is not overridden in a descendant class.</exception>
</Docs>
</Member>
<Member MemberName="Close">
<MemberSignature Language="C#" Value="public virtual void Close ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Close() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.WebResponse.Close" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub Close ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void Close();" />
<MemberSignature Language="F#" Value="abstract member Close : unit -&gt; unit&#xA;override this.Close : unit -&gt; unit" Usage="webResponse.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>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>When overridden by a descendant class, closes the response stream.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Net.WebResponse.Close%2A> method cleans up the resources used by a <xref:System.Net.WebResponse> and closes the underlying stream by calling the <xref:System.IO.Stream.Close%2A?displayProperty=nameWithType> method.
> [!NOTE]
> The response must be closed to avoid running out of system resources. The response stream can be closed by calling <xref:System.IO.Stream.Close%2A?displayProperty=nameWithType> or <xref:System.Net.WebResponse.Close%2A>.
> [!NOTE]
> The <xref:System.Net.WebResponse> class is an `abstract` class. The actual behavior of <xref:System.Net.WebResponse> instances at run time is determined by the descendant class returned by <xref:System.Net.WebRequest.GetResponse%2A?displayProperty=nameWithType>. For more information about default values and exceptions, please see the documentation for the descendant classes, such as <xref:System.Net.HttpWebResponse> and <xref:System.Net.FileWebResponse>.
## Examples
The following example uses the <xref:System.Net.WebResponse.Close%2A> method to close the `WebResponse`.
[!code-cpp[WebResponse_close#1](~/samples/snippets/cpp/VS_Snippets_Remoting/WebResponse_Close/CPP/webresponse_close.cpp#1)]
[!code-csharp[WebResponse_close#1](~/samples/snippets/csharp/VS_Snippets_Remoting/WebResponse_Close/CS/webresponse_close.cs#1)]
[!code-vb[WebResponse_close#1](~/samples/snippets/visualbasic/VS_Snippets_Remoting/WebResponse_Close/VB/webresponse_close.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.NotSupportedException">Any attempt is made to access the method, when the method is not overridden in a descendant class.</exception>
<related type="Article" href="~/docs/framework/network-programming/using-streams-on-the-network.md">Using Streams on the Network</related>
</Docs>
</Member>
<Member MemberName="ContentLength">
<MemberSignature Language="C#" Value="public abstract long ContentLength { get; }" FrameworkAlternate="dotnet-uwp-10.0;netcore-1.0;netcore-1.1" />
<MemberSignature Language="ILAsm" Value=".property instance int64 ContentLength" />
<MemberSignature Language="DocId" Value="P:System.Net.WebResponse.ContentLength" />
<MemberSignature Language="VB.NET" Value="Public MustOverride ReadOnly Property ContentLength As Long" FrameworkAlternate="dotnet-uwp-10.0;netcore-1.0;netcore-1.1" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; abstract property long ContentLength { long get(); };" FrameworkAlternate="dotnet-uwp-10.0;netcore-1.0;netcore-1.1" />
<MemberSignature Language="F#" Value="member this.ContentLength : int64" Usage="System.Net.WebResponse.ContentLength" FrameworkAlternate="dotnet-uwp-10.0;netcore-1.0;netcore-1.1" />
<MemberSignature Language="C#" Value="public virtual long ContentLength { get; set; }" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;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;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property ContentLength As Long" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;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;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property long ContentLength { long get(); void set(long value); };" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;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;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="F#" Value="member this.ContentLength : int64 with get, set" Usage="System.Net.WebResponse.ContentLength" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;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;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<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>
<AssemblyVersion>4.1.2.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>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int64</ReturnType>
</ReturnValue>
<Docs>
<summary>When overridden in a descendant class, gets or sets the content length of data being received.</summary>
<value>The number of bytes returned from the Internet resource.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Net.WebResponse.ContentLength%2A> property contains the length, in bytes, of the response from the Internet resource. For request methods that contain header information, the <xref:System.Net.WebResponse.ContentLength%2A> does not include the length of the header information.
> [!NOTE]
> The <xref:System.Net.WebResponse> class is an `abstract` class. The actual behavior of <xref:System.Net.WebResponse> instances at run time is determined by the descendant class returned by <xref:System.Net.WebRequest.GetResponse%2A?displayProperty=nameWithType>. For more information about default values and exceptions, please see the documentation for the descendant classes, such as <xref:System.Net.HttpWebResponse> and <xref:System.Net.FileWebResponse>.
## Examples
The following example uses the <xref:System.Net.WebResponse.ContentLength%2A> property to obtain the Length of the resource returned.
[!code-cpp[WebResponse_ContentLength_Type#1](~/samples/snippets/cpp/VS_Snippets_Remoting/WebResponse_ContentLength_Type/CPP/webresponse_contentlength_type.cpp#1)]
[!code-csharp[WebResponse_ContentLength_Type#1](~/samples/snippets/csharp/VS_Snippets_Remoting/WebResponse_ContentLength_Type/CS/webresponse_contentlength_type.cs#1)]
[!code-vb[WebResponse_ContentLength_Type#1](~/samples/snippets/visualbasic/VS_Snippets_Remoting/WebResponse_ContentLength_Type/VB/webresponse_contentlength_type.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.NotSupportedException">Any attempt is made to get or set the property, when the property is not overridden in a descendant class.</exception>
<altmember cref="P:System.Net.HttpWebResponse.ContentLength" />
</Docs>
</Member>
<Member MemberName="ContentType">
<MemberSignature Language="C#" Value="public abstract string ContentType { get; }" FrameworkAlternate="dotnet-uwp-10.0;netcore-1.0;netcore-1.1" />
<MemberSignature Language="ILAsm" Value=".property instance string ContentType" />
<MemberSignature Language="DocId" Value="P:System.Net.WebResponse.ContentType" />
<MemberSignature Language="VB.NET" Value="Public MustOverride ReadOnly Property ContentType As String" FrameworkAlternate="dotnet-uwp-10.0;netcore-1.0;netcore-1.1" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; abstract property System::String ^ ContentType { System::String ^ get(); };" FrameworkAlternate="dotnet-uwp-10.0;netcore-1.0;netcore-1.1" />
<MemberSignature Language="F#" Value="member this.ContentType : string" Usage="System.Net.WebResponse.ContentType" FrameworkAlternate="dotnet-uwp-10.0;netcore-1.0;netcore-1.1" />
<MemberSignature Language="C#" Value="public virtual string ContentType { get; set; }" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;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;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property ContentType As String" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;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;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property System::String ^ ContentType { System::String ^ get(); void set(System::String ^ value); };" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;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;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="F#" Value="member this.ContentType : string with get, set" Usage="System.Net.WebResponse.ContentType" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;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;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<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>
<AssemblyVersion>4.1.2.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>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>When overridden in a derived class, gets or sets the content type of the data being received.</summary>
<value>A string that contains the content type of the response.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Net.WebResponse.ContentType%2A> property contains the MIME content type of the response from the Internet resource, if known.
> [!NOTE]
> The <xref:System.Net.WebResponse> class is an `abstract` class. The actual behavior of <xref:System.Net.WebResponse> instances at run time is determined by the descendant class returned by <xref:System.Net.WebRequest.GetResponse%2A?displayProperty=nameWithType>. For more information about default values and exceptions, please see the documentation for the descendant classes, such as <xref:System.Net.HttpWebResponse> and <xref:System.Net.FileWebResponse>.
## Examples
The following example uses the <xref:System.Net.WebResponse.ContentType%2A> property to obtain the content type of the response.
[!code-cpp[WebResponse_ContentLength_Type#1](~/samples/snippets/cpp/VS_Snippets_Remoting/WebResponse_ContentLength_Type/CPP/webresponse_contentlength_type.cpp#1)]
[!code-csharp[WebResponse_ContentLength_Type#1](~/samples/snippets/csharp/VS_Snippets_Remoting/WebResponse_ContentLength_Type/CS/webresponse_contentlength_type.cs#1)]
[!code-vb[WebResponse_ContentLength_Type#1](~/samples/snippets/visualbasic/VS_Snippets_Remoting/WebResponse_ContentLength_Type/VB/webresponse_contentlength_type.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.NotSupportedException">Any attempt is made to get or set the property, when the property is not overridden in a descendant class.</exception>
<altmember cref="P:System.Net.HttpWebResponse.ContentType" />
</Docs>
</Member>
<MemberGroup MemberName="Dispose">
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Releases the resources used by the <see cref="T:System.Net.WebResponse" /> object.</summary>
</Docs>
</MemberGroup>
<Member MemberName="Dispose">
<MemberSignature Language="C#" Value="public void Dispose ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Dispose() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.WebResponse.Dispose" />
<MemberSignature Language="VB.NET" Value="Public Sub Dispose ()" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual void Dispose();" />
<MemberSignature Language="F#" Value="abstract member Dispose : unit -&gt; unit&#xA;override this.Dispose : unit -&gt; unit" Usage="webResponse.Dispose " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.IDisposable.Dispose</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.0.10.0</AssemblyVersion>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.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>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Releases the unmanaged resources used by the <see cref="T:System.Net.WebResponse" /> object.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Dispose">
<MemberSignature Language="C#" Value="protected virtual void Dispose (bool disposing);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void Dispose(bool disposing) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.WebResponse.Dispose(System.Boolean)" />
<MemberSignature Language="VB.NET" Value="Protected Overridable Sub Dispose (disposing As Boolean)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void Dispose(bool disposing);" />
<MemberSignature Language="F#" Value="abstract member Dispose : bool -&gt; unit&#xA;override this.Dispose : bool -&gt; unit" Usage="webResponse.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>
<AssemblyVersion>4.1.2.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>
<AssemblyVersion>2.1.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;netcore-3.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;netstandard-2.1;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.WebResponse" /> object, 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>
</Docs>
</Member>
<Member MemberName="GetObjectData">
<MemberSignature Language="C#" Value="protected virtual void GetObjectData (System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot 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.WebResponse.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)" />
<MemberSignature Language="C++ CLI" Value="protected:&#xA; virtual void GetObjectData(System::Runtime::Serialization::SerializationInfo ^ serializationInfo, System::Runtime::Serialization::StreamingContext streamingContext);" />
<MemberSignature Language="F#" Value="abstract member GetObjectData : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -&gt; unit&#xA;override this.GetObjectData : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -&gt; unit" Usage="webResponse.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>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<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;netstandard-2.1;netcore-3.1" />
<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;netstandard-2.1;netcore-3.1" />
</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 that is needed to serialize the target object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Any objects included in the <xref:System.Runtime.Serialization.SerializationInfo> are automatically tracked and serialized by the formatter.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="GetResponseStream">
<MemberSignature Language="C#" Value="public abstract System.IO.Stream GetResponseStream ();" FrameworkAlternate="dotnet-uwp-10.0;netcore-1.0;netcore-1.1" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.IO.Stream GetResponseStream() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Net.WebResponse.GetResponseStream" />
<MemberSignature Language="VB.NET" Value="Public MustOverride Function GetResponseStream () As Stream" FrameworkAlternate="dotnet-uwp-10.0;netcore-1.0;netcore-1.1" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; abstract System::IO::Stream ^ GetResponseStream();" FrameworkAlternate="dotnet-uwp-10.0;netcore-1.0;netcore-1.1" />
<MemberSignature Language="F#" Value="abstract member GetResponseStream : unit -&gt; System.IO.Stream" Usage="webResponse.GetResponseStream " FrameworkAlternate="dotnet-uwp-10.0;netcore-1.0;netcore-1.1" />
<MemberSignature Language="C#" Value="public virtual System.IO.Stream GetResponseStream ();" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;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;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function GetResponseStream () As Stream" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;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;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual System::IO::Stream ^ GetResponseStream();" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;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;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="F#" Value="abstract member GetResponseStream : unit -&gt; System.IO.Stream&#xA;override this.GetResponseStream : unit -&gt; System.IO.Stream" Usage="webResponse.GetResponseStream " FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;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;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<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>
<AssemblyVersion>4.1.2.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>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.IO.Stream</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>When overridden in a descendant class, returns the data stream from the Internet resource.</summary>
<returns>An instance of the <see cref="T:System.IO.Stream" /> class for reading data from the Internet resource.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Net.WebResponse.GetResponseStream%2A> method returns the data stream from the Internet resource.
> [!NOTE]
> The response stream must be closed to avoid running out of system resources. The response stream can be closed by calling <xref:System.IO.Stream.Close%2A?displayProperty=nameWithType> or <xref:System.Net.WebResponse.Close%2A>
## Examples
The following example uses <xref:System.Net.WebResponse.GetResponseStream%2A> to return a <xref:System.IO.StreamReader> instance. A small local buffer is used to read data from the <xref:System.IO.StreamReader> and output it to the console.
[!code-cpp[WebResponse_GetResponseStream#1](~/samples/snippets/cpp/VS_Snippets_Remoting/WebResponse_GetResponseStream/CPP/webresponse_getresponsestream.cpp#1)]
[!code-csharp[WebResponse_GetResponseStream#1](~/samples/snippets/csharp/VS_Snippets_Remoting/WebResponse_GetResponseStream/CS/webresponse_getresponsestream.cs#1)]
[!code-vb[WebResponse_GetResponseStream#1](~/samples/snippets/visualbasic/VS_Snippets_Remoting/WebResponse_GetResponseStream/VB/webresponse_getresponsestream.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.NotSupportedException">Any attempt is made to access the method, when the method is not overridden in a descendant class.</exception>
<related type="Article" href="~/docs/framework/network-programming/using-streams-on-the-network.md">Using Streams on the Network</related>
</Docs>
</Member>
<Member MemberName="Headers">
<MemberSignature Language="C#" Value="public virtual System.Net.WebHeaderCollection Headers { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Net.WebHeaderCollection Headers" />
<MemberSignature Language="DocId" Value="P:System.Net.WebResponse.Headers" />
<MemberSignature Language="VB.NET" Value="Public Overridable 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.WebResponse.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>
<AssemblyVersion>4.1.2.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>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Net.WebHeaderCollection</ReturnType>
</ReturnValue>
<Docs>
<summary>When overridden in a derived class, gets a collection of header name-value pairs associated with this request.</summary>
<value>An instance of the <see cref="T:System.Net.WebHeaderCollection" /> class that contains header values associated with this response.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Net.WebResponse.Headers%2A> property contains the name-value header pairs returned in the response.
> [!NOTE]
> The <xref:System.Net.WebResponse> class is an `abstract` class. The actual behavior of <xref:System.Net.WebResponse> instances at run time is determined by the descendant class returned by <xref:System.Net.WebRequest.GetResponse%2A?displayProperty=nameWithType>. For more information about default values and exceptions, please see the documentation for the descendant classes, such as <xref:System.Net.HttpWebResponse> and <xref:System.Net.FileWebResponse>.
## Examples
The following example displays all of the header name-value pairs returned in the <xref:System.Net.WebResponse>.
[!code-cpp[WebResponse_Headers#1](~/samples/snippets/cpp/VS_Snippets_Remoting/WebResponse_Headers/CPP/webresponse_headers.cpp#1)]
[!code-csharp[WebResponse_Headers#1](~/samples/snippets/csharp/VS_Snippets_Remoting/WebResponse_Headers/CS/webresponse_headers.cs#1)]
[!code-vb[WebResponse_Headers#1](~/samples/snippets/visualbasic/VS_Snippets_Remoting/WebResponse_Headers/VB/webresponse_headers.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.NotSupportedException">Any attempt is made to get or set the property, when the property is not overridden in a descendant class.</exception>
<altmember cref="T:System.Net.WebHeaderCollection" />
<altmember cref="P:System.Net.HttpWebResponse.Headers" />
</Docs>
</Member>
<Member MemberName="IsFromCache">
<MemberSignature Language="C#" Value="public virtual bool IsFromCache { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsFromCache" />
<MemberSignature Language="DocId" Value="P:System.Net.WebResponse.IsFromCache" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property IsFromCache As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property bool IsFromCache { bool get(); };" />
<MemberSignature Language="F#" Value="member this.IsFromCache : bool" Usage="System.Net.WebResponse.IsFromCache" />
<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>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether this response was obtained from the cache.</summary>
<value>
<see langword="true" /> if the response was taken from the cache; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The current cache policy and the presence of the requested resource in the cache determine whether a response can be retrieved from the cache. Using cached responses usually improves application performance, but there is a risk that the response in the cache does not match the response on the server. Use the <xref:System.Net.WebRequest.CachePolicy%2A> property to set and the <xref:System.Net.Cache.RequestCachePolicy> class to enumerate the current caching policy.
Note that getting this property can throw <xref:System.ObjectDisposedException>.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="IsMutuallyAuthenticated">
<MemberSignature Language="C#" Value="public virtual bool IsMutuallyAuthenticated { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IsMutuallyAuthenticated" />
<MemberSignature Language="DocId" Value="P:System.Net.WebResponse.IsMutuallyAuthenticated" />
<MemberSignature Language="VB.NET" Value="Public Overridable 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.WebResponse.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>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a <see cref="T:System.Boolean" /> value that indicates whether mutual authentication occurred.</summary>
<value>
<see langword="true" /> if both client and server were authenticated; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
To request mutual authentication, set the <xref:System.Net.WebRequest.AuthenticationLevel%2A?displayProperty=nameWithType> property using the <xref:System.Net.Security.AuthenticationLevel.MutualAuthRequested> or <xref:System.Net.Security.AuthenticationLevel.MutualAuthRequired> enumeration value. The default value for the <xref:System.Net.WebRequest.AuthenticationLevel%2A?displayProperty=nameWithType> property contains <xref:System.Security.Principal.TokenImpersonationLevel.Delegation> and <xref:System.Net.Security.AuthenticationLevel.MutualAuthRequested>.
Note that getting this property can throw <xref:System.ObjectDisposedException>.
## Examples
The following code example checks the value of this property.
[!code-cpp[NclCredPolicy#1](~/samples/snippets/cpp/VS_Snippets_Remoting/NCLCredPolicy/CPP/NCLCredPolicy.cpp#1)]
[!code-csharp[NclCredPolicy#1](~/samples/snippets/csharp/VS_Snippets_Remoting/NCLCredPolicy/CS/websample.cs#1)]
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="ResponseUri">
<MemberSignature Language="C#" Value="public abstract Uri ResponseUri { get; }" FrameworkAlternate="dotnet-uwp-10.0;netcore-1.0;netcore-1.1" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Uri ResponseUri" />
<MemberSignature Language="DocId" Value="P:System.Net.WebResponse.ResponseUri" />
<MemberSignature Language="VB.NET" Value="Public MustOverride ReadOnly Property ResponseUri As Uri" FrameworkAlternate="dotnet-uwp-10.0;netcore-1.0;netcore-1.1" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; abstract property Uri ^ ResponseUri { Uri ^ get(); };" FrameworkAlternate="dotnet-uwp-10.0;netcore-1.0;netcore-1.1" />
<MemberSignature Language="F#" Value="member this.ResponseUri : Uri" Usage="System.Net.WebResponse.ResponseUri" />
<MemberSignature Language="C#" Value="public virtual Uri ResponseUri { get; }" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;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;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property ResponseUri As Uri" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;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;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; virtual property Uri ^ ResponseUri { Uri ^ get(); };" FrameworkAlternate="netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netcore-3.1;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;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
<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>
<AssemblyVersion>4.1.2.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>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Uri</ReturnType>
</ReturnValue>
<Docs>
<summary>When overridden in a derived class, gets the URI of the Internet resource that actually responded to the request.</summary>
<value>An instance of the <see cref="T:System.Uri" /> class that contains the URI of the Internet resource that actually responded to the request.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Net.WebResponse.ResponseUri%2A> property contains the URI of the Internet resource that actually provided the response data. This resource might not be the originally requested URI if the underlying protocol allows redirection of the request.
> [!NOTE]
> The <xref:System.Net.WebResponse> class is an `abstract` class. The actual behavior of <xref:System.Net.WebResponse> instances at run time is determined by the descendant class returned by <xref:System.Net.WebRequest.GetResponse%2A?displayProperty=nameWithType>. For more information about default values and exceptions, please see the documentation for the descendant classes, such as <xref:System.Net.HttpWebResponse> and <xref:System.Net.FileWebResponse>.
## Examples
The following example uses the <xref:System.Net.WebResponse.ResponseUri%2A> property to determine the location from which the <xref:System.Net.WebResponse> originated.
[!code-cpp[WebResponse_ResponseUri#1](~/samples/snippets/cpp/VS_Snippets_Remoting/WebResponse_ResponseUri/CPP/webresponse_responseuri.cpp#1)]
[!code-csharp[WebResponse_ResponseUri#1](~/samples/snippets/csharp/VS_Snippets_Remoting/WebResponse_ResponseUri/CS/webresponse_responseuri.cs#1)]
[!code-vb[WebResponse_ResponseUri#1](~/samples/snippets/visualbasic/VS_Snippets_Remoting/WebResponse_ResponseUri/VB/webresponse_responseuri.vb#1)]
]]></format>
</remarks>
<exception cref="T:System.NotSupportedException">Any attempt is made to get or set the property, when the property is not overridden in a descendant class.</exception>
</Docs>
</Member>
<Member MemberName="SupportsHeaders">
<MemberSignature Language="C#" Value="public virtual bool SupportsHeaders { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool SupportsHeaders" />
<MemberSignature Language="DocId" Value="P:System.Net.WebResponse.SupportsHeaders" />
<MemberSignature Language="VB.NET" Value="Public Overridable 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.WebResponse.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>
<AssemblyVersion>4.1.2.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>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value that indicates if headers are supported.</summary>
<value>Returns <see cref="T:System.Boolean" />.
<see langword="true" /> if headers are supported; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This property is always true for [!INCLUDE[net_v45](~/includes/net-v45-md.md)].
]]></format>
</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.WebResponse.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.0.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>When overridden in a derived class, releases all resources used by the <see cref="T:System.Net.WebResponse" />. </summary>
<remarks>To be added.</remarks>
<exception cref="T:System.NotSupportedException">
Any attempt is made to access the method, when the method is not overridden in a descendant class. </exception>
</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.WebResponse.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>
<AssemblyVersion>2.1.0.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net.Requests</AssemblyName>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<AssemblyVersion>4.1.1.0</AssemblyVersion>
<AssemblyVersion>4.1.2.0</AssemblyVersion>
</AssemblyInfo>
<AssemblyInfo>
<AssemblyName>System.Net</AssemblyName>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName>System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")</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;netstandard-2.1;netcore-3.1" />
<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;netstandard-2.1;netcore-3.1" />
</Parameters>
<Docs>
<param name="serializationInfo">A <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that will hold the serialized data for the <see cref="T:System.Net.WebResponse" />.</param>
<param name="streamingContext">A <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains the destination of the serialized stream that is associated with the new <see cref="T:System.Net.WebResponse" />.</param>
<summary>Populates a <see cref="T:System.Runtime.Serialization.SerializationInfo" /> instance with the data that is needed to serialize <see cref="T:System.Net.WebResponse" />.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
</Type>
You can’t perform that action at this time.