Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

HttpRequestHeader Enumeration

The HTTP headers that may be specified in a client request.

Namespace:  System.Net
Assemblies:   System.Net.Requests (in System.Net.Requests.dll)
  System (in System.dll)

public enum HttpRequestHeader

Member nameDescription
Supported by Portable Class LibrarySupported in .NET for Windows Store appsAcceptThe Accept header, which specifies the MIME types that are acceptable for the response.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsAcceptCharsetThe Accept-Charset header, which specifies the character sets that are acceptable for the response.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsAcceptEncodingThe Accept-Encoding header, which specifies the content encodings that are acceptable for the response.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsAcceptLanguageThe Accept-Langauge header, which specifies that natural languages that are preferred for the response.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsAllowThe Allow header, which specifies the set of HTTP methods supported.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsAuthorizationThe Authorization header, which specifies the credentials that the client presents in order to authenticate itself to the server.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsCacheControlThe Cache-Control header, which specifies directives that must be obeyed by all cache control mechanisms along the request/response chain.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsConnectionThe Connection header, which specifies options that are desired for a particular connection.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsContentEncodingThe Content-Encoding header, which specifies the encodings that have been applied to the accompanying body data.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsContentLanguageThe Content-Langauge header, which specifies the natural language(s) of the accompanying body data.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsContentLengthThe Content-Length header, which specifies the length, in bytes, of the accompanying body data.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsContentLocationThe Content-Location header, which specifies a URI from which the accompanying body may be obtained.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsContentMd5The Content-MD5 header, which specifies the MD5 digest of the accompanying body data, for the purpose of providing an end-to-end message integrity check.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsContentRangeThe Content-Range header, which specifies where in the full body the accompanying partial body data should be applied.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsContentTypeThe Content-Type header, which specifies the MIME type of the accompanying body data.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsCookieThe Cookie header, which specifies cookie data presented to the server.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsDateThe Date header, which specifies the date and time at which the request originated.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsExpectThe Expect header, which specifies particular server behaviors that are required by the client.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsExpiresThe Expires header, which specifies the date and time after which the accompanying body data should be considered stale.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsFromThe From header, which specifies an Internet E-mail address for the human user who controls the requesting user agent.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsHostThe Host header, which specifies the host name and port number of the resource being requested.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsIfMatchThe If-Match header, which specifies that the requested operation should be performed only if the client's cached copy of the indicated resource is current.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsIfModifiedSinceThe If-Modified-Since header, which specifies that the requested operation should be performed only if the requested resource has been modified since the indicated data and time.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsIfNoneMatchThe If-None-Match header, which specifies that the requested operation should be performed only if none of client's cached copies of the indicated resources are current.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsIfRangeThe If-Range header, which specifies that only the specified range of the requested resource should be sent, if the client's cached copy is current.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsIfUnmodifiedSinceThe If-Unmodified-Since header, which specifies that the requested operation should be performed only if the requested resource has not been modified since the indicated date and time.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsKeepAliveThe Keep-Alive header, which specifies a parameter used into order to maintain a persistent connection.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsLastModifiedThe Last-Modified header, which specifies the date and time at which the accompanying body data was last modified.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsMaxForwardsThe Max-Forwards header, which specifies an integer indicating the remaining number of times that this request may be forwarded.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsPragmaThe Pragma header, which specifies implementation-specific directives that might apply to any agent along the request/response chain.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsProxyAuthorizationThe Proxy-Authorization header, which specifies the credentials that the client presents in order to authenticate itself to a proxy.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsRangeThe Range header, which specifies the the sub-range(s) of the response that the client requests be returned in lieu of the entire response.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsRefererThe Referer header, which specifies the URI of the resource from which the request URI was obtained.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsTeThe TE header, which specifies the transfer encodings that are acceptable for the response.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsTrailerThe Trailer header, which specifies the header fields present in the trailer of a message encoded with chunked transfer-coding.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsTransferEncodingThe Transfer-Encoding header, which specifies what (if any) type of transformation that has been applied to the message body.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsTranslateThe Translate header, a Microsoft extension to the HTTP specification used in conjunction with WebDAV functionality.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsUpgradeThe Upgrade header, which specifies additional communications protocols that the client supports.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsUserAgentThe User-Agent header, which specifies information about the client agent.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsViaThe Via header, which specifies intermediate protocols to be used by gateway and proxy agents.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsWarningThe Warning header, which specifies additional information about that status or transformation of a message that might not be reflected in the message.

The appropriate contents of various headers are described in detail in the HTTP/1.1 specification, available at rfc2616.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Portable Class Library

Supported in: Portable Class Library

.NET for Windows Store apps

Supported in: Windows 8

Supported in: Windows Phone 8.1

Supported in: Windows Phone Silverlight 8.1

Supported in: Windows Phone Silverlight 8

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft