Share via


Headers Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Gets the headers that are associated with this response from the server.

Namespace:  System.Net
Assembly:  System.Http (in System.Http.dll)

Syntax

'Declaration
Public Overrides ReadOnly Property Headers As WebHeaderCollection
public override WebHeaderCollection Headers { get; }
public:
virtual property WebHeaderCollection^ Headers {
    WebHeaderCollection^ get () override;
}
abstract Headers : WebHeaderCollection with get
override Headers : WebHeaderCollection with get
override function get Headers () : WebHeaderCollection

Property Value

Type: System.Net. . :: . .WebHeaderCollection
A WebHeaderCollection that contains the header information returned with the response.

Remarks

The Headers 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 HttpWebResponse class. The following table lists common headers that the API exposes as properties.

Header

Property

Content-Encoding

ContentEncoding

Content-Length

ContentLength

Content-Type

ContentType

Last-Modified

LastModified

Server

Server

.NET Framework Security

See Also

Reference

HttpWebResponse Class

System.Net Namespace